XSLT <xsl:набор-атрибутов>
❮ Полный справочник по элементам XSLT
Определение и использование
Элемент <xsl:attribute-set> создает именованный набор атрибутов. Набор атрибутов может применяться к выходному документу как единое целое.
Примечание. Должен быть дочерним элементом <xsl:stylesheet> или <xsl:transform>.
Синтаксис
<xsl:attribute-set
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
Атрибуты
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 |
Пример 1
Создайте набор атрибутов, который можно применить к любому выходному элементу:
<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>
❮ Полный справочник по элементам XSLT