title: XML Reuse Question
body: <p>In XML, is it possible to reuse elements?</p>
  
  <p>Specifically, the problem that I am trying to solve is the following. I want to define an element <code>table</code> that contains an element <code>tableSchema</code> and an element <code>dataSource</code>. I want to do this in a way that a <code>table</code>s can refer to a <code>tableSchema</code> defined elsewhere. Thusly, I can have multiple reports defining <code>table</code>s according to the same <code>tableSchema</code>.</p>
  
  <p>To clarify, I would like be able to do the following:</p>
  
  <pre><code>&lt;report name="Report1"&gt;
    &lt;page&gt;
      &lt;table&gt;
        &lt;!--reference to tableSchema named "foo"--&gt;
        &lt;dataSource&gt;fooData&lt;/dataSource&gt;
      &lt;/table&gt;
    &lt;/page&gt;
    &lt;page&gt;
      &lt;table&gt; 
        &lt;!--reference to tableSchema named "bar"--&gt;
        &lt;dataSource&gt;barData&lt;/dataSource&gt;
      &lt;/table&gt;
    &lt;/page&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;report name="Report2"&gt;
    &lt;page&gt;
      &lt;table&gt;
        &lt;!--reference to tableSchema named "foo" (same as above!)--&gt;
        &lt;dataSource&gt;anotherFooData&lt;/dataSource&gt;
      &lt;/table&gt;
    &lt;/page&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>and have <code>tableSchema</code>s <code>bar</code> and <code>foo</code> defined elsewhere, possibly in the same XML document.</p>
  
  <p>Edited to add: Here, by tableSchema, I do not mean another Xml schema. I mean a definition the fields in a <code>table</code>. For example, I would like to be able to do the following:</p>
  
  <pre><code>&lt;tableSchema name="bar"&gt;
      &lt;field&gt;
        &lt;displayName&gt;bar1&lt;/displayName&gt;
        &lt;sourceName&gt;bar1Source&lt;/sourceName&gt;
        &lt;format&gt;Currency&lt;/format&gt;
      &lt;/field&gt;
      &lt;field&gt;
        &lt;displayName&gt;bar2&lt;/displayName&gt;
        &lt;sourceName&gt;bar2Source&lt;/sourceName&gt;
        &lt;format&gt;Text&lt;/format&gt;
      &lt;/field&gt;
  &lt;/tableSchema&gt;
  
  &lt;tableSchema name="foo"&gt;
      &lt;field&gt;
        &lt;displayName&gt;foo1&lt;/displayName&gt;
        &lt;sourceName&gt;foo1Source&lt;/sourceName&gt;
        &lt;format&gt;Percent&lt;/format&gt;
      &lt;/field&gt;
  &lt;/tableSchema&gt;
  </code></pre>
  
  <p>Then, in the above, <code>Report1</code> defines a report that contains two <code>table</code>s, one formatted according to the <code>tableSchema</code> <code>foo</code>, and a second formatted according to the <code>tableSchema</code> <code>bar</code>, and <code>Report2</code> defines a report that contains one <code>table</code> that is formatted according to the <code>tableSchema</code> <code>foo</code> and that schema is the same as in <code>Report1</code>.</p>