[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Converting attributes to elements and preserving t

Subject: Re: Converting attributes to elements and preserving the hierarchy
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 19 Dec 2001 10:58:22 +0000
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.