All pastes #909349 Raw Edit

Something

public text v1 · immutable
·published 2008-02-19 01:55 UTC
rendered paste body
  <!-- whole document -->
  <xsl:template match="/">

    <xsl:variable name="Pass1">
      <xsl:call-template name="recurse"/>
    </xsl:variable>
    <!-- If the output contains any nodes with 'inherits' we need to recurse the entire transform -->
    <xsl:choose >
      <xsl:when test="msxsl:node-set($Pass1)//*/@inherits">
        <!-- Recurse-->
        <xsl:apply-templates select="msxsl:node-set($Pass1)"/>
      </xsl:when>
      <xsl:otherwise>
        <!-- All done-->
        <xsl:copy-of select="msxsl:node-set($Pass1)"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>