Subject: [xsl] Re: RE: syntax sugar for call-template From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Thu, 15 Feb 2001 23:49:28 -0800 (PST) |
> > > In the past I've considered doing this in Saxon. But I'm undecided whether > > > the attribute value should be an AVT (therefore always yielding a string) or > > > an XPath expression (in which case any value can be passed, but strings need > > > to be written in double-nested quotes, e.g. arg="'London'"). Any views? > > > > > > > Obviously, only the latter will make it possible to substitute any > > xsl:call-template with xf:func. > > As pointed out by Steve Muench, the attribute version will > not be able to pass result fragments. However, a slightly > modified version using "elements" will do the trick... > > <xf:func one="xpath" /> <xsl:call-template name="func"> > becomes <xsl:with-param name="one" > select="xpath" /> > </xsl:call-template> > > > <xf:func one="xpath" > <xsl:call-template name="func"> > <two> <xsl:with-param name="one" > <res>frag</res> becomes select="xpath" /> > </two> <xsl:with-param name="two"> > </xf:func> <res>frag</res> > </xsl:with-param> > </xsl:call-template> > > Clearly, the attribute-only version is much cleaner. However, > the element syntax below could be used for those times when a > result fragment must be passed... I'm not sure I like it though. In case an RTF must be passed as parameter, why should it be literally included? Having it into a variable and using: <xf:func one="xpath" two="$varRTF"/> is the elegant way of doing this. Also, isn't it true that there would not be any RTF data type in XSLT 1.1? 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Union of StepPattern, Adam Van Den Hoven | Thread | [xsl] Re: RE: syntax sugar for call, Dimitre Novatchev |
RE: [xsl] XSLT 1.1 comments, Kaganovich, Yevgeniy | Date | Re: [xsl] hello to list, Michael Hoffmann |
Month |