April 2001
Intermediate to advanced
112 pages
2h 15m
English
<xsl:attribute-set>
<xsl:attribute-set name=”name" [use-attribute-sets=”list“]/>
This allows the naming of a collection of attributes that can be applied to elements.
The following example creates an attribute set for images and applies them with a template:
<xsl:attribute-set name="image">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="width">120</xsl:attribute>
<xsl:attribute name="height">60</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="image">
<img src="{@url}" xsl:use-attribute-sets="image"/>
</xsl:template>The use-attribute-sets option allows you to include a list of other attribute sets in the one being defined.
Read now
Unlock full access