December 2002
Intermediate to advanced
576 pages
32h
English
<xsl:attribute set>
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.
<xsl:attribute-set name="name" [use-attribute-sets="list"]/>
Read now
Unlock full access