The Price Schema

<?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>
  <oneOrMore>
    <element name="COMPOSER">
      <data type="string"/>
    </element>
  </oneOrMore>
  <zeroOrMore>
    <element name="PRODUCER">
      <data type="string"/>
    </element>
  </zeroOrMore>
  <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>
  <oneOrMore>
    <element name="ARTIST">
      <data type="string"/>
    </element>
  </oneOrMore>
  <element name="PRICE">
    <data type="string">
      <param name="pattern">\p{Sc}\p{Nd}+(\.\p{Nd}\p{Nd})?</param>
    </data>
  </element>
</element> 

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

Previous | Next | Top | Cafe con Leche

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