Annotations

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

    <oneOrMore>
      <element name="COMPOSER">
        <data type="string"/>
      </element>
    </oneOrMore>
    <zeroOrMore>
      <element name="PRODUCER">
        <data type="string"/>
      </element>
    </zeroOrMore>
    <oneOrMore>
      <element name="ARTIST">
        <data type="string"/>
      </element>
    </oneOrMore>
  
  <optional>
    <element name="PUBLISHER">
      <data type="string"/>
    </element>
  </optional>
  <optional>
    <element name="LENGTH">
      <data type="string"/>
    </element>
  </optional>
  <optional>
    <element name="YEAR">
      <data type="gYear" />
    </element>
  </optional>

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

namespace ns1 = "http://www.w3.org/1999/xhtml"

element SONG {
  element TITLE        { text },
  (element COMPOSER    { xsd:string }+
   & element PRODUCER  { xsd:string }*
   & element ARTIST    { xsd:string }+
   & element PUBLISHER { xsd:string }?
   & element LENGTH    { xsd:string }?
   & element YEAR      { xsd:gYear }?
   & element PRICE {
       xsd:string { pattern = "\p{Sc}\p{Nd}+(\.\p{Nd}\p{Nd})?" }
     })
}

Previous | Next | Top | Cafe con Leche

Copyright 2005-2007 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified October 26, 2004