This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: RE; Re: RE: syntax sugar for call-template
- To: mhkay at iclway dot co dot uk
- Subject: [xsl] RE: RE; Re: RE: syntax sugar for call-template
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Tue, 20 Feb 2001 00:05:16 -0800 (PST)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
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