<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="xsl-elements" page="attribute-set" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: xsl:attribute-set</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: xsl:attribute-set"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>xsl:attribute-set</h1>
      <p>The <code>xsl:attribute-set</code> element is used to declare a named collection of attributes, which will often
be used together to define an output style. It is declared at the top level (subordinate to <code>xsl:stylesheet</code>).</p>
      <p>An attribute-set contains a collection of <code>xsl:attribute</code> elements.</p>
      <p>The attributes in an attribute-set can be used in several ways:</p>
      <ul>
         <li content="para">
            <p>They can be added to a literal result element by specifying <code>xsl:use-attribute-sets</code> in the list of attributes
for the element. The value is a space-separated list of attribute-set names. Attributes specified explicitly on
the literal result element, or added using <code>xsl:attribute</code>, override any that are specified in the attribute-set
definition.</p>
         </li>
         <li content="para">
            <p>They can be added to an element created using <code>xsl:element</code>, by specifying use-attribute-sets in the list of attributes
for the xsl:element element. The value is a space-separated list of attribute-set names. Attributes specified explicitly on
the literal result element, or added using <code>xsl:attribute</code>, override any that are specified in the attribute-set
definition.</p>
         </li>
         <li content="para">
            <p>One attribute set can be based on another by specifying <code>use-attribute-sets</code> in the list of attributes
for the <code>xsl:attribute-set</code> element. Again, attributes defined explicitly in the attribute set override any that
are included implicitly from another attribute set.</p>
         </li>
      </ul>
      <p>Attribute sets named in the <code>xsl:use-attribute-sets</code> or <code>use-attribute-sets</code> attribute 
are applied in the order given: if the same attribute is generated more than once, the later value always takes
precedence.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="break.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>