xsl-list
[Top] [All Lists]

RE: [xsl] Why Are My Tunnel Parameters Not Working?

2008-03-06 08:59:11

As Mike Kay pointed out recently, with union "node()|@*" the 
nodes will be de-duplicated and sorted into document order, 
but with a sequence "@*,node()" the nodes are processed in 
sequential order.

So using the sequence constructor instead of union you save 
the unnecessary step of sorting and de-duping.

Actually, I discovered another twist on this a few days ago. I had started
rewriting (@*|*) as (@*,*) to avoid the need for a sort, and the consequence
was that an unnecessary sort was added for a/(@*|*) because it no longer
recognized that this path expression was "naturally" sorted.

But of course once you spot such coding patterns it's easy to analyze them
and do the right thing.

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