Re: Re: Designs for XSLT functions (Was: Re: RE: synta
Hi Jeni, --- Jeni Tennison <mail@xxxxxxxxxxxxxxxx> wrote: > Dimitre Novatchev wrote: > >> 1.a. Using xsl:template vs. using exsl:function > > > > > > <xsl:function name="QName" p1="p1Name p1Default" > > .................... > > pN="pNName pNDefault" > > > > > > > <!-- Contents here --> > > > > </xsl:function> > > So rather than using xsl:param, you'd like to be able to have > attributes in exsl:function, with the name of the attribute indicating > its order (for positional calling of parameters), and each taking two > space-separated values: a name and a default value. Am I interpreting > your snippet correctly, Dimitre? > Yes, this is the correct understanding. As a special case the default value could be omited. > >> 2.a. exsl:function() vs. my:func() > > > > > > None of these. > > > > Just: > > > > fn() > > > > I think fn() must be a standard XSLT/XPath function -- these > > functions do not have a full QName. > > Unfortunately, we are not in a position to introduce standard > XSLT/XPath functions. Only those in the WG are, and only when new > versions of their standards come out. We will move a lot quicker at > getting this functionality if we create an extension function for now, > which can later be moved into the XSLT namespace (and hence be > unprefixed). > I see... Then somePrefix:fn() What is different in exsl:function() vs. my:func() ??? They seem the same to me. > >> 2.b. Passing parameters by position vs. name > > > > > > fn(QName, p1="Name1 Value1",..., pN="NameN ValueN") > > > > This allows parameters to be passed by name (as above), > > This is a syntax that isn't allowed in XSLT 1.0. That's not to say > that it wouldn't be a useful syntax to have, just that *we* cannot > make that change. > OK, But the following is allowed, isn't it? x:fn(QName, "Name1 Value1",..., "NameN ValueN") Variations of this allow for passing by name -- only, passing by position only, or a mixture of passing by name and passing by position. Cheers, Dimitre. __________________________________________________ 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format