xsl-list
[Top] [All Lists]

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

2005-11-13 11:23:53
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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--