Re: Designs for XSLT functions (Was: Re: RE: syntax su
> Personally, I think that this is too restrictive. As you point out, > it makes ifs and chooses quite difficult. [ snip ] > But this sparked something for me - having an exsl:return inside a > xsl:for-each: > > <xsl:for-each select="$node"> > <xsl:if test="*"> > <exsl:return select="true()" /> > </xsl:if> > </xsl:for-each> Yes, my proposal relies on a conditional construct in XPath. I think it's more worthwile to try and get such a thing in as early as possible than to try and figure out a intuitive and concise definition of how the mix of XPath and arbitrary template instructions should behave. I think your example with xsl:for-each shows that this isn't straight forward. You would have to recursively allow and dissalow constructs for descendants of a xsl:function. On the other hand I think my proposal would be very easy to define. You could think of it as a parameterized global xsl:variable. No special rules and exceptions, just straight forward XSLT as we know it. Then again, it relies on a XPath conditional construct to gain full flexibility. Cheers </David> David Rosenborg Pantor Engineering AB 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