xsl-list
[Top] [All Lists]

RE: Theory: Identity Transforms

2006-02-01 10:59:39
The first one applies template rules to attribute nodes, the second one
copies attribute nodes unconditionally. If you don't have any template rules
that match attribute nodes, then they do exactly the same thing.

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

-----Original Message-----
From: Rick Quatro [mailto:frameexpert(_at_)truevine(_dot_)net] 
Sent: 01 February 2006 17:32
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Theory: Identity Transforms

Hello All,

I am trying to get a handle on some basic XSLT concepts. I am 
looking at 
identity transforms and see these two basic templates:

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

<xsl:template match="node()|@*" mode="copy">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates mode="copy"/>
  </xsl:copy>
</xsl:template>

I don't understand the difference between the two. Thanks in advance.

Rick Quatro
Carmen Publishing
585-659-8267
www.frameexpert.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>
--~--




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



<Prev in Thread] Current Thread [Next in Thread>