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">
          <param name="pattern">\p{Sc}\p{Nd}+(\.\p{Nd}\p{Nd})?</param>
        </data>
      </element>
    </optional>
    
  </interleave>
</element>
 

Previous | Next | Top | Cafe con Leche

Copyright 2000-2003, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 16, 2003