xsl-list
[Top] [All Lists]

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

2008-03-06 08:39:59
On 06/03/2008, Florent Georges <lists(_at_)fgeorges(_dot_)org> wrote:
Andrew Welch wrote:

 > <xsl:apply-templates select="@*"/>
 > <xsl:apply-templates/>

 > which is the same as:

 > <xsl:apply-templates select="(@*, node())"/>

  Which is the same as:


    <xsl:apply-templates select="@*, node()"/>


 which is the same as:


    <xsl:apply-templates select="@*|node()"/>

 or even as:

    <xsl:apply-templates select="node()|@*"/>

 :-)


Not quite....

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.

http://ajwelch.blogspot.com/2008/01/indentity-transform-for-xslt-20.html


cheers
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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