Mega Code Archive

 
Categories / XML Tutorial / XSLT StyleSheet
 

Include another style sheet

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>