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

RE: sorted for-each: preceding::sibling is not in sort

Subject: RE: sorted for-each: preceding::sibling is not in sort order
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 13 Nov 2005 18:23:53 -0000
xslt for each preceding
> > XSLT 2.0 allows you to use xsl:sequence
> > instead of xsl:copy-of, so you can construct a variable 
> whose value is a
> > sequence of nodes (node references) without making copies 
> of the nodes.
> 
> Wouldn't I once again have the problem with
> preceding::sibling when they are references?

Yes, this doesn't enable you to use preceding-sibling; what it does do is to
enable you to create a variable whose value is a sorted sequence of nodes,
each of which retains its original owner and children, etc, without copying
the nodes; you can then process this sequence using a variety of new XSLT
2.0 and XPath 2.0 constructs that make it unnecessary to use
preceding-sibling.

IIRC correctly, though, your problem was a grouping problem in which case
you can probably solve it directly using XSLT 2.0's for-each-group
construct.

Michael Kay
http://www.saxonica.com/

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.