XSLT <xsl:attribute-set> 要素
定義と用法
<xsl:attribute-set> 要素は名前付きの属性セットを作成できます。この属性セット(attribute-set)は、全体として出力文書に適用できます。
注記:必ず <xsl:stylesheet> または <xsl:transform> の子要素でなければなりません。
文法
<xsl:attribute-set name="name" use-attribute-sets="name-list"> <!-- Content:xsl:attribute* --> </xsl:attribute-set>
属性
属性 | 値 | 説明 |
---|---|---|
name | name | 必須。属性セットの名前を指定します。 |
use-attribute-sets | name-list | 任意。この属性集中で使用される他の属性セットのリスト、スペースで区切ります。 |
例
例 1
任意の出力要素に適用できる属性セット(attribute-set)を作成します:
<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>