24-20.xsd
上传用户:shuxianled
上传日期:2007-01-18
资源大小:6404k
文件大小:2k
源码类别:

xml/soap/webservice

开发平台:

Others

  1. <?xml version="1.0"?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3.   <xsd:element name="SONG" type="SongType"/>
  4.   <xsd:complexType name="PhotoType">
  5.     <xsd:attribute name="SRC"    type="xsd:anyURI"
  6.                    use="required" />
  7.     <xsd:attribute name="WIDTH"  type="xsd:positiveInteger"
  8.                    use="required" />
  9.     <xsd:attribute name="HEIGHT" type="xsd:positiveInteger"
  10.                    use="required" />
  11.     <xsd:attribute name="ALT"    type="xsd:string"
  12.                    use="required" />
  13.   </xsd:complexType>
  14.   <xsd:complexType name="SongType">
  15.     <xsd:sequence>
  16.       <xsd:element name="TITLE"     type="xsd:string"/>
  17.       <xsd:element name="PHOTO"     type="PhotoType"/>
  18.       <xsd:element name="COMPOSER"  type="PersonType"
  19.                    maxOccurs="unbounded"/>
  20.       <xsd:element name="PRODUCER"  type="PersonType"
  21.                    minOccurs="0" maxOccurs="unbounded"/>
  22.       <xsd:element name="PUBLISHER" type="xsd:string"
  23.                    minOccurs="0"/>
  24.       <xsd:element name="LENGTH"    type="xsd:duration"/>
  25.       <xsd:element name="YEAR"      type="xsd:gYear"/>
  26.       <xsd:element name="ARTIST"    type="xsd:string"
  27.                    maxOccurs="unbounded"/>
  28.       <xsd:element name="PRICE" type="money"/>
  29.     </xsd:sequence>
  30.   </xsd:complexType>
  31.   <xsd:simpleType name="money">
  32.     <xsd:restriction base="xsd:string">             
  33.       <xsd:pattern value="p{Sc}p{Nd}+(.p{Nd}p{Nd})?"/>
  34.       <!--
  35.          Regular Expression:
  36.          p{Sc}             Any Unicode currency indicator;
  37.                             e.g., $, &#xA5, &#xA3, &#A4, etc.
  38.          p{Nd}             A Unicode decimal digit character
  39.          p{Nd}+            One or more Unicode decimal digits
  40.          .                 The period character
  41.          (.p{Nd}p{Nd})
  42.          (.p{Nd}p{Nd})?  Zero or one strings of the form .35
  43.   
  44.          This works for any decimalized currency.
  45.   
  46.       -->
  47.     </xsd:restriction>
  48.   </xsd:simpleType>
  49.   <xsd:complexType name="PersonType">
  50.     <xsd:sequence>
  51.       <xsd:element name="NAME">
  52.         <xsd:complexType>
  53.           <xsd:all>
  54.             <xsd:element name="GIVEN"  type="xsd:string"/>
  55.             <xsd:element name="FAMILY" type="xsd:string"/>
  56.           </xsd:all>
  57.         </xsd:complexType>
  58.       </xsd:element>
  59.     </xsd:sequence>
  60.   </xsd:complexType>
  61. </xsd:schema>