Reversing the Default Namespace

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:song="http://ibiblio.org/xml/namespace/song"
  targetNamespace="http://ibiblio.org/xml/namespace/song"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
>
 
  <element name="song:SONG" type="song:SongType"/>

  <complexType name="song:SongType">
    <sequence>
      <element name="song:TITLE" type="string"/>
      <element name="song:PHOTO" type="song:PhotoType"  
        minOccurs="0"/>
      <element name="song:COMPOSER"  type="string" 
        maxOccurs="unbounded"/>
      <element name="song:PRODUCER"  type="string" 
        minOccurs="0" maxOccurs="unbounded"/>
      <element name="song:PUBLISHER" type="string" 
        minOccurs="0"/>    
      <element name="song:YEAR" type="gYear"/>
      <element name="song:ARTIST" type="string" 
        minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>

  <complexType name="song:PhotoType">
    <complexContent>
       <restriction base="anyType">
         <attribute name="ALT"    type="string"/>
         <attribute name="WIDTH"  type="nonNegativeInteger"/>
         <attribute name="HEIGHT" type="nonNegativeInteger"/> 
      </restriction>
    </complexContent>
  </complexType>
  
</schema>

Previous | Next | Top | Cafe con Leche

Copyright 2001 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified August 30, 2000