Changeset 1614

Show
Ignore:
Timestamp:
03/11/10 13:22:06 (2 years ago)
Author:
amandel
Message:

Refine xsd for #80 - xsd for simple-types.xml

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/xml/schema/simple-types.xsd

    • Property svn:mime-type set to text/xml
    r1612 r1614  
    99    <xs:complexType name="simpleTypes"> 
    1010        <xs:sequence> 
    11             <xs:element name="typeSafeEnumerations" type="typeSafeEnumerations"/> 
    12             <xs:element name="restrictedStrings" type="restrictedStrings"/> 
    13             <xs:element name="restrictedLongs" type="restrictedLongs"/> 
    14             <xs:element name="fixPointNumbers" type="fixPointNumbers"/> 
    15             <xs:element name="valueObjects" type="valueObjects"/> 
     11            <xs:element name="typeSafeEnumerations" type="typeSafeEnumerations" minOccurs="0"/> 
     12            <xs:element name="restrictedStrings" type="restrictedStrings" minOccurs="0"/> 
     13            <xs:element name="restrictedLongs" type="restrictedLongs" minOccurs="0"/> 
     14            <xs:element name="fixPointNumbers" type="fixPointNumbers" minOccurs="0"/> 
     15            <xs:element name="valueObjects" type="valueObjects" minOccurs="0"/> 
    1616        </xs:sequence> 
    1717    </xs:complexType> 
     
    2121        <xs:sequence> 
    2222            <xs:element name="enumeration" type="enumeration" 
    23                 maxOccurs="unbounded"/> 
     23                maxOccurs="unbounded" minOccurs="0"/> 
    2424        </xs:sequence> 
    2525    </xs:complexType> 
     
    5050        <xs:restriction base="xs:string"> 
    5151            <xs:enumeration value="numeric"/> 
     52            <xs:enumeration value="integer"/> 
    5253            <xs:enumeration value="string"/> 
    5354        </xs:restriction> 
     
    5960        <xs:sequence> 
    6061            <xs:element name="restrictedString" type="restrictedString" 
    61                 maxOccurs="unbounded"/> 
     62                maxOccurs="unbounded" minOccurs="0"/> 
    6263        </xs:sequence> 
    6364    </xs:complexType> 
    6465    <xs:complexType mixed="true" name="restrictedString"> 
    6566        <xs:choice> 
     67            <xs:element name="description" type="description" 
     68                minOccurs="0"/> 
    6669            <xs:element name="constant" type="constant" 
    6770                minOccurs="0" maxOccurs="unbounded"/> 
    6871        </xs:choice> 
    69         <xs:attribute name="min-length" type="xs:positiveInteger" 
    70             use="required"/> 
    71         <xs:attribute name="max-length" type="xs:positiveInteger" 
     72        <xs:attribute name="min-length" type="lengthType" 
     73            use="required"/> 
     74        <xs:attribute name="max-length" type="lengthType" 
    7275            use="required"/> 
    7376        <xs:attribute name="package" type="javaPackageName" 
     
    9093    <xs:complexType name="restrictedLong"> 
    9194        <xs:sequence> 
    92             <xs:element name="constant" type="constant"/> 
     95            <xs:element name="constant" type="constant" 
     96                minOccurs="0" maxOccurs="unbounded"/> 
    9397        </xs:sequence> 
    9498        <xs:attribute name="classname" type="javaClassName" 
     
    105109        <xs:sequence> 
    106110            <xs:element name="fixPointNumber" type="fixPointNumber" 
    107                 maxOccurs="unbounded"/> 
     111                maxOccurs="unbounded" minOccurs="0"/> 
    108112        </xs:sequence> 
    109113    </xs:complexType> 
    110114    <xs:complexType name="fixPointNumber"> 
    111115        <xs:sequence> 
     116            <xs:element name="description" type="description" minOccurs="0"/> 
    112117            <xs:element name="constant" type="constant" 
    113118                minOccurs="0" maxOccurs="unbounded"/> 
     
    131136        <xs:sequence> 
    132137            <xs:element name="valueObject" type="valueObject" 
    133                 maxOccurs="unbounded"/> 
     138                maxOccurs="unbounded" minOccurs="0"/> 
    134139        </xs:sequence> 
    135140    </xs:complexType> 
     
    181186 
    182187    <!-- Used globally --> 
     188    <xs:simpleType name="lengthType"> 
     189        <xs:restriction base="xs:string"/> 
     190    </xs:simpleType> 
    183191    <xs:simpleType name="javaPackageName"> 
    184192        <xs:restriction base="xs:string"/> 
     
    200208        </xs:restriction> 
    201209    </xs:simpleType> 
    202     <xs:complexType mixed="true" name="description"/> 
     210    <xs:complexType mixed="true" name="description"> 
     211        <xs:sequence> 
     212            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 
     213        </xs:sequence> 
     214    </xs:complexType> 
    203215     
    204216