include another xsl style sheet : include « XSLT stylesheet « XML






include another xsl style sheet


File: Data.xml


File: Transform.xslt

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0">

  <xsl:include href="inlines.xsl" />

  <xsl:template match="chapter">
    <html>
      <xsl:apply-templates />
    </html>
  </xsl:template>

  <xsl:template match="para">
    <p>
      <xsl:apply-templates />
    </p>
  </xsl:template>

  <xsl:template match="chapter/title">
    <h1>
      <xsl:apply-templates />
    </h1>
  </xsl:template>

</xsl:stylesheet>


File: inlines.xsl

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0">

  <xsl:template match="emphasis">
    <b>
      <xsl:apply-templates />
    </b>
  </xsl:template>

  <xsl:template match="literal">
    <tt>
      <xsl:apply-templates />
    </tt>
  </xsl:template>

</xsl:stylesheet>

 








Related examples in the same category

1.include another xslt