xsl-list
[Top] [All Lists]

Re: [xsl] How Can I Reference previous XML in Subsequent Iterations?

2007-04-18 09:07:07

I found out the hard way that a sorted node-set is not iterated in  
the sorted order,

XSLT has sets, "sets" as always denotes a datatype with no order
property, the set {1,2,3] is the same as the set {2,3,1}.

XSLT2 changes the underlying datatype to sequences which do have an
order, which is sometimes useful when processing sorted data.

(the libxslt implementation used in PHP  
I believe libxslt supports teh node-set extension function which means
that you can create a document with things in the right order and then
process that (in-memory) document without having to serialise and
re-parse it. This allows you to do a two-stage process, forst sort and
filter then process, without having to use two explict transformation
steps.

David

--~------------------------------------------------------------------
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>
--~--