|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Designs for XSLT functions (Was: Re: RE: syntax su
On Wed, 21 Feb 2001, Jeni Tennison wrote: > > 3. Create a new tag, <xsl:append select="xpath" /> which will: > > > > (a) if the xpath type is a node-set, then it appends each > > element of the node set onto the result-set. > > > > (b) otherwise, a text node is appended with the string-value > > of the path expression. > > I'm not sure why you need exsl:append (and also think it looks > dangerously close to something [say it quietly] procedural). Can you > give a use case that shows how useful it would be? I know there is a way to do this... but let's say I wanted a node set containing the 4th child of each node in a list. ... <xsl:variable name="list" select="..." /> <xsl:for-each select="$list" /> <exsl:append "./node()[4]" /> </xsl:for-each> <exsl:return /> ... Not a very good example... but then again, I was trying to think of a syntax that would allow a node set to be built-up over the course of the function, and <exsl:return ... /> does not do this. It isn't "procedural", since you are appending (not mutating) a list. clark 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
|

Cart








