Re: Sequences in XSLT 2.0..
> Now everything is a sequence. > Earlier everything was a node-set. not quite true. In XSLT2 everything is a sequence but in xslt1 atomic values such as numbers and strings were not in a node set or a sequence. One advantage of sequences is that you can store sequences of strings etc ("a","b", ....) The other is that sequences become first class objects that may be saved in variables and re-used. XSLT1 had sequences (called lists there) but these were just transient objects "the current node list" that could not be stored. If you go select="ancestor::*" then just inside the step the current node list is the ancestors in reverse document order so  selects your grandparent, but this could not be stored, ,xsl:variable name="x" select="ancestor::*"/> selects the unordered set of ancestors then select="$x" orders that set in document order so  selects teh grandchild of the document element. Similarly inside <xsl:for-each select="zzzz"> <xsl:sort select="mmm"/> the current node list is the ordered list sorted by mmm but that list can not be saved in order, if you need it again later you have to re-sort. In XSLT2 sorted sequences can be saved. Other reasons have to do with alignment with xsd schema but they are, natutrally:-) almost all bad, but on balance ordered sequences are probably a good thing (although perhaps they might have been better still if they had allowed sequences of sequences) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
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