[Home] [By Thread] [By Date] [Recent Entries]
At 2009-10-15 13:58 -0400, Syd Bauman wrote:
Michael -- Those are different, Syd, so not interchangeable. The first does not give the identity template stylesheet an opportunity to intervene on a particular attribute node being pushed at the stylesheet. This would be done with a: <xsl:template match="@abc">..... for the cases where attribute processing is minimal, right? May I ask if that is because it's more efficient, more elegant, more XSLT-ish, or just personal preference? Note that I learned from Mike that the XSLT 2 way of doing the identity template is different still: <xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*,node()"/>
</xsl:copy>
</xsl:template>Note the use of the "," instead of "|" as this apparently prevents the need for the processor to arrange the nodes in document order. Not a big savings, but a savings nonetheless. We all learn a lot from Mike! . . . . . . . . . . . . Ken -- Upcoming: hands-on code list, UBL, XSLT, XQuery and XSL-FO classes in Copenhagen Denmark and Washington DC USA, October/November 2009 Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



