24-20.xsd
上传用户:shuxianled
上传日期:2007-01-18
资源大小:6404k
文件大小:2k
- <?xml version="1.0"?>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="SONG" type="SongType"/>
- <xsd:complexType name="PhotoType">
- <xsd:attribute name="SRC" type="xsd:anyURI"
- use="required" />
- <xsd:attribute name="WIDTH" type="xsd:positiveInteger"
- use="required" />
- <xsd:attribute name="HEIGHT" type="xsd:positiveInteger"
- use="required" />
- <xsd:attribute name="ALT" type="xsd:string"
- use="required" />
- </xsd:complexType>
- <xsd:complexType name="SongType">
- <xsd:sequence>
- <xsd:element name="TITLE" type="xsd:string"/>
- <xsd:element name="PHOTO" type="PhotoType"/>
- <xsd:element name="COMPOSER" type="PersonType"
- maxOccurs="unbounded"/>
- <xsd:element name="PRODUCER" type="PersonType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="PUBLISHER" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="LENGTH" type="xsd:duration"/>
- <xsd:element name="YEAR" type="xsd:gYear"/>
- <xsd:element name="ARTIST" type="xsd:string"
- maxOccurs="unbounded"/>
- <xsd:element name="PRICE" type="money"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="money">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="p{Sc}p{Nd}+(.p{Nd}p{Nd})?"/>
- <!--
- Regular Expression:
- p{Sc} Any Unicode currency indicator;
- e.g., $, ¥, £, &#A4, etc.
- p{Nd} A Unicode decimal digit character
- p{Nd}+ One or more Unicode decimal digits
- . The period character
- (.p{Nd}p{Nd})
- (.p{Nd}p{Nd})? Zero or one strings of the form .35
-
- This works for any decimalized currency.
-
- -->
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="NAME">
- <xsd:complexType>
- <xsd:all>
- <xsd:element name="GIVEN" type="xsd:string"/>
- <xsd:element name="FAMILY" type="xsd:string"/>
- </xsd:all>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>