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]

RE: RE; Re: RE: syntax sugar for call-template


Hi Mike,

>  > It is possible to have a positional only syntax form like in:
>  >
>  > fn(functionQName, p1="p1Value" ... pN="pNValue")
>  >
>  > ... The above will be directly usable from within an XPath expression.
>  >
>  Not within an XPath 1.0 expression it won't.
>  
>  Within the XSL+XPath conformance rules, we have the option of defining new
>  extension functions and extension elements, we don't have the option of
>  extending the XPath syntax.
>  
>  (If it weren't for that, I'd be perfectly happy with named arguments in
>  function calls.)

I'd also be happy -- can't this be proposed for XPath 2.0?

As for the nearest future, a slightly changed syntax will fit into XPath 1.0:

fn(functionQName, p1Value, ... pNValue)
The above is strictly positional.

We could also have the following

fn(functionQName, "p1Name p1Value", ... "pNName pNValue")
all arguments are name-value pairs and this is essentially passing arguments by name.


Or we could even have the following:

fn(functionQName, "p1Value", "p2Value", "p3Name p3Value",... "pNName pNValue")
here the first two arguments are passed by position and the rest -- by name.

Dimitre Novatchev.


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

 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]