Include another style sheet : include « XSLT stylesheet « XML Tutorial






File: Transform.xslt

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

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

  <xsl:template match="/">
    <picture xsl:use-attribute-sets="picture-attributes">
      <xsl:attribute name="color">red</xsl:attribute>
    </picture>
  </xsl:template>

</xsl:stylesheet>

File: attributes.xsl

<?xml version="1.0"?>

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

  <xsl:attribute-set name="picture-attributes">
    <xsl:attribute name="color">blue</xsl:attribute>
    <xsl:attribute name="transparency">100</xsl:attribute>
  </xsl:attribute-set>

</xsl:stylesheet>








5.74.include
5.74.1.Include another style sheet
5.74.2.xsl:include example