title: Attribute specialization & constraint module
body: <p>I have the requirement from user to make the specialization attribute @a,@b,@c based on @base attribute. And @a and @b are applicable for all of the elements but for about @c it is desired to use it only for <code>&lt;fig&gt;</code> elements. <code>&lt;fig&gt;</code> element exists in OASIS scheme (DTD) and is not my specialization element.</p>
  
  <p>As far as I know the attribute specialization can be done by the following RELAX NG coding.</p>
  
  <pre><code>   &lt;define name="aAtt-d-attribute"&gt;
       &lt;optional&gt;
           &lt;attribute name="a"&gt;
               &lt;a:documentation&gt;Specifies @a to which an element applies.
               &lt;/a:documentation&gt;
           &lt;/attribute&gt;
       &lt;/optional&gt;    
     &lt;/define&gt;
     &lt;define name="base-attribute-extensions" combine="interleave"&gt;
         &lt;ref name="aAtt-d-attribute"/&gt;
     &lt;/define&gt;
  </code></pre>
  
  <p>But I am not sure how to write the constraint module for @c in RELAX NG and integrate them into shell .rng file. Please give me your advice.</p>