A Prefixed Schema for a Document that uses Namespaces

<?xml version="1.0"?>
<element xmlns="http://relaxng.org/ns/structure/1.0"
         name="sng:SONG" 
         xmlns:sng="http://www.cafeconleche.org/namespace/song">
  <element name="sng:TITLE">
    <text/>
  </element>
  <element name="sng:PHOTO">
    <attribute name="ALT">
      <text/>
    </attribute>
    <attribute name="WIDTH">
      <text/>
    </attribute>
    <attribute name="HEIGHT">
      <text/>
    </attribute>
  </element>
  <oneOrMore>
    <element name="sng:COMPOSER">
      <text/>
    </element>
  </oneOrMore>
  <zeroOrMore>
    <element name="sng:PRODUCER">
      <text/>
    </element>
  </zeroOrMore>
  <optional>
    <element name="sng:PUBLISHER">
      <text/>
    </element>
  </optional>
  <optional>
    <element name="sng:LENGTH">
      <text/>
    </element>
  </optional>
  <optional>
    <element name="sng:YEAR">
      <text/>
    </element>
  </optional>
  <oneOrMore>
    <element name="sng:ARTIST">
      <text/>
    </element>
  </oneOrMore>
</element>

namespace sng = "http://www.cafeconleche.org/namespace/song"

element sng:SONG {
  element sng:TITLE { text },
  element sng:PHOTO {
    attribute ALT    { text },
    attribute WIDTH  { text },
    attribute HEIGHT { text }
  },
  element sng:COMPOSER  { text }+,
  element sng:PRODUCER  { text }*,
  element sng:PUBLISHER { text }?,
  element sng:LENGTH    { text }?,
  element sng:YEAR      { text }?,
  element sng:ARTIST    { text }+
}

Previous | Next | Top | Cafe con Leche

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