#?SuikaWiki/0.9
[1] [CODE(XSLTa)[use-attribute-sets]]
属性は、 [CODE(XSLTe)[[VAR[xslt:]][[element]]]],
[CODE(XSLTe)[[VAR[xslt:]][[copy]]]] 両要素で使用できます。
また、任意の[[表記結果要素]]で
[CODE(XSLTa)[[VAR[xslt]]:use-attribute-sets]]
属性が使用できます。

これらの属性は、結果木に生成する[[属性節]]の集合の定義の参照に使います。
<http://www.w3.org/TR/xslt#element-attribute-set>

[2] 値は [[qnames]], すなわち空白区切りの[[修飾名]]の集合です。
この修飾名は、 [CODE(XSLTe)[[VAR[xslt:]]attribute-set]]
要素で定義した[[属性集合]]の名前です。
[WEAK[この名前が定義されていない時にどうするかは仕様書には明記されていません。]]

[CODE(XSLTe)[[VAR[xslt:]]attribute-set]] 要素で
[CODE(XSLTa)[use-attribute-sets]] 属性を使うと直接又は間接に自身を参照することが可能ですが、
これは[[誤り]]です。

[3] 同じ名前の属性は、大体直感的に上書きされていきます。
例:
[PRE[
<xslt:template>
  <element xslt:use-attribute-sets="set1 set2"
           attr1="val1">
    <xslt:attribute name="attr6">val7</xslt:attribute>
    <xslt:attribute name="attr1">val8</xslt:attribute>
  </element>
</xslt:template>

<xslt:attribute-set name="set1">
  <xslt:attribute name="attr2">val2</xslt:attribute>
  <xslt:attribute name="attr3">val3</xslt:attribute>
</xslt:attribute-set>

<xslt:attribute-set name="set1" use-attribute-sets="set3">
  <xslt:attribute name="attr3">val4</xslt:attribute>
</xslt:attribute-set>

<xslt:attribute-set name="set2">
  <xslt:attribute name="attr4">val5</xslt:attribute>
</xslt:attribute-set>

<xslt:attribute-set name="set3">
  <xslt:attribute name="attr5">val6</xslt:attribute>
  <xslt:attribute name="attr3">val9</xslt:attribute>
</xslt:attribute-set>
]PRE]
の結果木は
[PRE[
<element attr1="val8" attr2="val2" attr3="val3"
         attr4="val5" attr5="val6" attr6="val7"/>
]PRE]

[4] [CODE(XSLTe)[[VAR[xslt:]]attribute-set]]
要素に [CODE(XSLTa)[use-attribute-sets]]
属性が使われているときには、
= まず参照されている名前の属性集合を併合して用意します
= で、用意された属性集合を参照元要素の先頭に挿入します
= こうして用意した結果が、属性集合となります
= 同じ名前の要素があるときは、この属性集合が併合の対象となります。

<http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E26>
