The node() and @* wildcards

To copy everything including:

we have to use greedier wild cards:

  <!-- pass unrecognized nodes along unchanged -->
  <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>  

xt doesn't yet recognize node() in match patterns


The output is the same in this case, though for a document that used more HTML it might be different.


Previous | Next | Top | Cafe con Leche

Copyright 1999 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 23, 1999