This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Case of function names (Was: Re: comments on December F&O draft)


> I believe these should change in any case. (Apart from anything else I
> don't see any need for constructors at the user level as I
> commented in my original F&O commnets list)
>
I'm not keen on constructors as currently defined either, but we do need
something that says which of the following is a static error and which is a
dynamic error:

(a) date("2002-01-05$$")

(b) date(concat("2002", "-", "01", "-", "05$$"))

(c) let $x := "2002"
    date(concat($x, "-", "01", "-", "05$$"))

The main reason for introducing constructors was to provide an equivalent to
literals, for those data types that have no native literal syntax in the
language. I personally like the idea of using identical syntax for
constructors and for conversion functions, so long as we can get the
error-handling right.

I'd also like to allow an XPath processor to reject any of the above
statically, which might mean we have to introduce some
implementation-dependence: "if the values of the arguments to a function
call are known statically (whether or not they are expressed as literals),
then an XPath processor *may* evaluate the result of the function
statically, and *may* report any error that results from evaluating the
function as a static error". In the case of functions classified as
constructors, with literal arguments, that *may* is currently a *must".

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]