A RELAX-NG Song Schema

<?xml version="1.0?>
<element name="SONG" xmlns="http://relaxng.org/ns/structure/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <interleave>
  
    <element name="TITLE">
      <text/>
    </element>
    
    <zeroOrMore>
      <element name="COMPOSER">
        <text/>
      </element>
    </zeroOrMore>
    
    <zeroOrMore>
      <element name="PRODUCER">
        <text/>
      </element>
    </zeroOrMore>
    
    <optional>
      <element name="PUBLISHER">
        <text/>
      </element>
    </optional>

    <element name="LENGTH">
      <data type="duration"/>
    </element>

    <element name="YEAR">
      <data type="gYear"/>
    </element>

    <oneOrMore>
      <element name="ARTIST">
        <text/>
      </element>
    <oneOrMore>

    <optional>
      <element name="PRICE">
        <data type="string" pattern="\p{Sc}\p{Nd}+(\.\p{Nd}\p{Nd})?"/>
      </element>
    </optional>
    
  </interleave>
</element>

Previous | Next | Top | Cafe con Leche

Copyright 2000-2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 9, 2002