XSLT <xsl:attribute-set>
❮ Pełne odniesienie do elementu XSLT
Definicja i użycie
Element <xsl:attribute-set> tworzy nazwany zestaw atrybutów. Zestaw atrybutów można zastosować w całości do dokumentu wyjściowego.
Uwaga: musi być dzieckiem <xsl:stylesheet> lub <xsl:transform>.
Składnia
<xsl:attribute-set
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
Atrybuty
Attribute | Value | Description |
---|---|---|
name | name | Required. Specifies the name of the attribute-set |
use-attribute-sets | name-list | Optional. A white space separated list of other attribute-sets to use in the attribute-set |
Przykład 1
Utwórz zestaw atrybutów, który można zastosować do dowolnego elementu wyjściowego:
<xsl:attribute-set name="font">
<xsl:attribute name="fname">Arial</xsl:attribute>
<xsl:attribute name="size">14px</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
</xsl:attribute-set>
❮ Pełne odniesienie do elementu XSLT