XSL stylesheet 2<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > |
<xsl:template match="/"> |
<xsl:apply-templates select="/xslTutorial/*"/> |
</xsl:template> |
<xsl:template match="*"> |
<xsl:copy use-attribute-sets='{name(.)}'> |
<xsl:value-of select="."/> |
</xsl:copy> |
</xsl:template> |
<xsl:attribute-set name="H1"> |
<xsl:attribute name='align'>center</xsl:attribute> |
<xsl:attribute name='style'>color:red</xsl:attribute> |
</xsl:attribute-set> |
<xsl:attribute-set name="P"> |
<xsl:attribute name='align'>left</xsl:attribute> |
<xsl:attribute name='style'>color:blue</xsl:attribute> |
</xsl:attribute-set> |
</xsl:stylesheet> |