[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Converting attributes to elements and preserving t
Mike Kay wrote: > For advanced users: use xsl:for-each only when you are absolutely > confident that the structure of the source documents handled by your > stylesheet is not going to change. I use another guideline, which is to use xsl:for-each when you use the position() or last() function in the 'template' (the content of the xsl:for-each or xsl:template). The reason for this is that the result of the position()/last() functions for a particular node are completely dependant on the nodes that are selected for processing. I think keeping the location path that selects the nodes and the use of the position()/last() functions close together (as you do with an xsl:for-each) makes the stylesheet easier to understand and maintain than when the location path and the function call are in completely different parts of the stylesheet. Jeni --- Jeni Tennison http://www.jenitennison.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
|