XSLT <xsl:attribute-set>Element


XSLT 元素参考手册Complete XSLT Element Reference

Definition and Usage

The <xsl:attribute-set> element creates a named set of attributes. This attribute set can be applied as a whole to the output document.

Note:Must be a child of <xsl:stylesheet> or <xsl:transform>.


Syntax

<xsl:attribute-set
name="name" use-attribute-sets="name-list">

<!-- Content:xsl:attribute* -->

</xsl:attribute-set>

Attributes

Attributes Value Description
name name Required. Specifies the name of the attribute set.
use-attribute-sets name-list Optional. A space-separated list of other attribute sets used in this attribute set.

Example 1

Creates an attribute set that can be applied to any output element:

<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 元素参考手册Complete XSLT Element Reference Other extensions