Sharing Content Models

<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

  <start>
  
    <element name="SONG">
      <element name="TITLE">
        <text/>
      </element>
      
      <oneOrMore>
        <element name="COMPOSER">
          <ref name="personContent"/>
        </element>
      </oneOrMore>
      
      <zeroOrMore>
        <element name="PRODUCER">
          <ref name="personContent"/>
        </element>
      </zeroOrMore>
      
      <optional>
        <element name="PUBLISHER">
          <text/>
        </element>
      </optional>
      <optional>
        <element name="LENGTH">
          <text/>
        </element>
      </optional>
      <optional>
        <element name="YEAR">
          <text/>
        </element>
      </optional>
      <oneOrMore>
        <element name="ARTIST">
          <text/>
        </element>
      </oneOrMore>
    </element>
    
  </start>

  <define name="personContent">
    <element name="NAME">
      <element name="GIVEN">
        <text/>
      </element>
      <element name="FAMILY">
        <text/>
      </element>
    </element>
  </define>

</grammar>

Previous | Next | Top | Cafe con Leche

Copyright 2005, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 2, 2006