<html xmlns="http://www.w3.org/1999/xhtml" a0:Name="SuikaWiki" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:Version="0.9"><head></head><body><p><a0:anchor-end a0:anchor="1">[1]</a0:anchor-end> <code class="XSLTa">use-attribute-sets</code>
属性は、 <code class="XSLTe"><var>xslt:</var><a0:anchor>element</a0:anchor></code>,
<code class="XSLTe"><var>xslt:</var><a0:anchor>copy</a0:anchor></code> 両要素で使用できます。
また、任意の<a0:anchor>表記結果要素</a0:anchor>で
<code class="XSLTa"><var>xslt</var>:use-attribute-sets</code>
属性が使用できます。</p><p>これらの属性は、結果木に生成する<a0:anchor>属性節</a0:anchor>の集合の定義の参照に使います。
<a0:anchor-external a0:resParameter="http://www.w3.org/TR/xslt#element-attribute-set" a0:resScheme="URI">http://www.w3.org/TR/xslt#element-attribute-set</a0:anchor-external></p><p><a0:anchor-end a0:anchor="2">[2]</a0:anchor-end> 値は <a0:anchor>qnames</a0:anchor>, すなわち空白区切りの<a0:anchor>修飾名</a0:anchor>の集合です。
この修飾名は、 <code class="XSLTe"><var>xslt:</var>attribute-set</code>
要素で定義した<a0:anchor>属性集合</a0:anchor>の名前です。
<a0:weak>この名前が定義されていない時にどうするかは仕様書には明記されていません。</a0:weak></p><p><code class="XSLTe"><var>xslt:</var>attribute-set</code> 要素で
<code class="XSLTa">use-attribute-sets</code> 属性を使うと直接又は間接に自身を参照することが可能ですが、
これは<a0:anchor>誤り</a0:anchor>です。</p><p><a0:anchor-end a0:anchor="3">[3]</a0:anchor-end> 同じ名前の属性は、大体直感的に上書きされていきます。
例:<pre><a0:anchor-external a0:resParameter="xslt:template" a0:resScheme="URI">xslt:template</a0:anchor-external>
  &lt;element xslt:use-attribute-sets=&quot;set1 set2&quot;
           attr1=&quot;val1&quot;&gt;
    <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr6&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr6&quot;</a0:anchor-external>val7&lt;/xslt:attribute&gt;
    <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr1&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr1&quot;</a0:anchor-external>val8&lt;/xslt:attribute&gt;
  &lt;/element&gt;
&lt;/xslt:template&gt;

<a0:anchor-external a0:resParameter="xslt:attribute-set name=&quot;set1&quot;" a0:resScheme="URI">xslt:attribute-set name=&quot;set1&quot;</a0:anchor-external>
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr2&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr2&quot;</a0:anchor-external>val2&lt;/xslt:attribute&gt;
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr3&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr3&quot;</a0:anchor-external>val3&lt;/xslt:attribute&gt;
&lt;/xslt:attribute-set&gt;

<a0:anchor-external a0:resParameter="xslt:attribute-set name=&quot;set1&quot; use-attribute-sets=&quot;set3&quot;" a0:resScheme="URI">xslt:attribute-set name=&quot;set1&quot; use-attribute-sets=&quot;set3&quot;</a0:anchor-external>
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr3&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr3&quot;</a0:anchor-external>val4&lt;/xslt:attribute&gt;
&lt;/xslt:attribute-set&gt;

<a0:anchor-external a0:resParameter="xslt:attribute-set name=&quot;set2&quot;" a0:resScheme="URI">xslt:attribute-set name=&quot;set2&quot;</a0:anchor-external>
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr4&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr4&quot;</a0:anchor-external>val5&lt;/xslt:attribute&gt;
&lt;/xslt:attribute-set&gt;

<a0:anchor-external a0:resParameter="xslt:attribute-set name=&quot;set3&quot;" a0:resScheme="URI">xslt:attribute-set name=&quot;set3&quot;</a0:anchor-external>
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr5&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr5&quot;</a0:anchor-external>val6&lt;/xslt:attribute&gt;
  <a0:anchor-external a0:resParameter="xslt:attribute name=&quot;attr3&quot;" a0:resScheme="URI">xslt:attribute name=&quot;attr3&quot;</a0:anchor-external>val9&lt;/xslt:attribute&gt;
&lt;/xslt:attribute-set&gt;</pre><p>の結果木は<pre>&lt;element attr1=&quot;val8&quot; attr2=&quot;val2&quot; attr3=&quot;val3&quot;
         attr4=&quot;val5&quot; attr5=&quot;val6&quot; attr6=&quot;val7&quot;/&gt;</pre></p></p><p><a0:anchor-end a0:anchor="4">[4]</a0:anchor-end> <code class="XSLTe"><var>xslt:</var>attribute-set</code>
要素に <code class="XSLTa">use-attribute-sets</code>
属性が使われているときには、<ol><li>まず参照されている名前の属性集合を併合して用意します</li><li>で、用意された属性集合を参照元要素の先頭に挿入します</li><li>こうして用意した結果が、属性集合となります</li><li>同じ名前の要素があるときは、この属性集合が併合の対象となります。</li></ol></p><p><a0:anchor-external a0:resParameter="http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E26" a0:resScheme="URI">http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E26</a0:anchor-external></p></body></html>