trunk/resources/tests/dom3/Core/files/datatype_normalization.xsd
changeset 0 5057afe1ec87
equal deleted inserted replaced
-1:000000000000 0:5057afe1ec87
       
     1 <!--
       
     2 
       
     3 Copyright (c) 2001-2004 World Wide Web Consortium, 
       
     4 (Massachusetts Institute of Technology, Institut National de
       
     5 Recherche en Informatique et en Automatique, Keio University).  All 
       
     6 Rights Reserved.  This program is distributed under the W3C's Software
       
     7 Intellectual Property License.  This program is distributed in the 
       
     8 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
       
     9 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
       
    10 PURPOSE.  
       
    11 
       
    12 See W3C License http://www.w3.org/Consortium/Legal/ for more details.
       
    13 
       
    14 -->
       
    15 
       
    16 
       
    17 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
       
    18 	targetNamespace="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"
       
    19 	xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization">
       
    20 
       
    21   <xsd:element name="data">
       
    22   	  <xsd:complexType>
       
    23   	  		<xsd:choice minOccurs="0" maxOccurs="unbounded">
       
    24   	  	  		<xsd:element ref="double"/>
       
    25   	  	  		<xsd:element ref="boolean"/>
       
    26   	  	  		<xsd:element ref="decimal"/>
       
    27   	  	  		<xsd:element ref="float"/>
       
    28   	  	  		<xsd:element ref="dateTime"/>
       
    29   	  	  		<xsd:element ref="time"/>
       
    30   	  		</xsd:choice>
       
    31   	  </xsd:complexType>
       
    32   </xsd:element>
       
    33   
       
    34   <xsd:simpleType name="myDouble">
       
    35   	<xsd:restriction base="xsd:double"/>
       
    36   </xsd:simpleType>
       
    37 
       
    38   <xsd:simpleType name="myDoubleList">
       
    39   	<xsd:list itemType="myDouble"/>
       
    40   </xsd:simpleType>
       
    41 
       
    42   <xsd:simpleType name="myDoubleUnion">
       
    43   	<xsd:union memberTypes="myDouble xsd:anyURI"/>
       
    44   </xsd:simpleType>
       
    45 
       
    46   <xsd:element name="double">
       
    47   	  <xsd:complexType>
       
    48   	  	  <xsd:simpleContent>
       
    49   	  	  	  <xsd:extension base="myDoubleList">
       
    50   	  	  	  		<xsd:attribute name="value" type="myDouble" use="required"/>
       
    51   	  	  	  		<xsd:attribute name="union" type="myDoubleUnion" use="required"/>
       
    52   	  	  	  		<xsd:attribute name="default" type="myDouble" 
       
    53   	  	  	  			default="+0003.141592600E+0000" use="optional"/>
       
    54   	  	  	  </xsd:extension>
       
    55   	  	  </xsd:simpleContent>
       
    56   	  </xsd:complexType>
       
    57   </xsd:element>
       
    58   	  	  	  
       
    59 
       
    60   <xsd:simpleType name="myBoolean">
       
    61   	<xsd:restriction base="xsd:boolean"/>
       
    62   </xsd:simpleType>
       
    63 
       
    64   <xsd:simpleType name="myBooleanList">
       
    65   	<xsd:list itemType="myBoolean"/>
       
    66   </xsd:simpleType>
       
    67 
       
    68   <xsd:simpleType name="myBooleanUnion">
       
    69   	<xsd:union memberTypes="myBoolean xsd:anyURI"/>
       
    70   </xsd:simpleType>
       
    71 
       
    72   <xsd:element name="boolean">
       
    73   	  <xsd:complexType>
       
    74   	  	  <xsd:simpleContent>
       
    75   	  	  	  <xsd:extension base="myBooleanList">
       
    76   	  	  	  		<xsd:attribute name="value" type="myBoolean" use="required"/>
       
    77   	  	  	  		<xsd:attribute name="union" type="myDoubleUnion" use="required"/>
       
    78   	  	  	  		<xsd:attribute name="default" type="myBoolean" 
       
    79   	  	  	  			default="1" use="optional"/>
       
    80   	  	  	  </xsd:extension>
       
    81   	  	  </xsd:simpleContent>
       
    82   	  </xsd:complexType>
       
    83   </xsd:element>
       
    84 
       
    85 
       
    86   <xsd:simpleType name="myDecimal">
       
    87   	<xsd:restriction base="xsd:decimal"/>
       
    88   </xsd:simpleType>
       
    89 
       
    90   <xsd:simpleType name="myDecimalList">
       
    91   	<xsd:list itemType="myDecimal"/>
       
    92   </xsd:simpleType>
       
    93 
       
    94   <xsd:simpleType name="myDecimalUnion">
       
    95   	<xsd:union memberTypes="myDecimal xsd:anyURI"/>
       
    96   </xsd:simpleType>
       
    97 
       
    98   <xsd:element name="decimal">
       
    99   	  <xsd:complexType>
       
   100   	  	  <xsd:simpleContent>
       
   101   	  	  	  <xsd:extension base="myDecimalList">
       
   102   	  	  	  		<xsd:attribute name="value" type="myDecimal" use="required"/>
       
   103   	  	  	  		<xsd:attribute name="union" type="myDecimalUnion" use="required"/>
       
   104   	  	  	  		<xsd:attribute name="default" type="myDecimal" 
       
   105   	  	  	  			default="+0003.141592600" use="optional"/>
       
   106   	  	  	  </xsd:extension>
       
   107   	  	  </xsd:simpleContent>
       
   108   	  </xsd:complexType>
       
   109   </xsd:element>
       
   110 
       
   111   <xsd:simpleType name="myFloat">
       
   112   	<xsd:restriction base="xsd:float"/>
       
   113   </xsd:simpleType>
       
   114 
       
   115   <xsd:simpleType name="myFloatList">
       
   116   	<xsd:list itemType="myFloat"/>
       
   117   </xsd:simpleType>
       
   118 
       
   119   <xsd:simpleType name="myFloatUnion">
       
   120   	<xsd:union memberTypes="myFloat xsd:anyURI"/>
       
   121   </xsd:simpleType>
       
   122 
       
   123   <xsd:element name="float">
       
   124   	  <xsd:complexType>
       
   125   	  	  <xsd:simpleContent>
       
   126   	  	  	  <xsd:extension base="myFloatList">
       
   127   	  	  	  		<xsd:attribute name="value" type="myFloat" use="required"/>
       
   128   	  	  	  		<xsd:attribute name="union" type="myFloatUnion" use="required"/>
       
   129   	  	  	  		<xsd:attribute name="default" type="myDouble" 
       
   130   	  	  	  			default="+0003.141592600E+0000" use="optional"/>
       
   131   	  	  	  </xsd:extension>
       
   132   	  	  </xsd:simpleContent>
       
   133   	  </xsd:complexType>
       
   134   </xsd:element>
       
   135 
       
   136 
       
   137   <xsd:simpleType name="myDateTime">
       
   138   	<xsd:restriction base="xsd:dateTime"/>
       
   139   </xsd:simpleType>
       
   140 
       
   141   <xsd:simpleType name="myDateTimeList">
       
   142   	<xsd:list itemType="myDateTime"/>
       
   143   </xsd:simpleType>
       
   144 
       
   145   <xsd:simpleType name="myDateTimeUnion">
       
   146   	<xsd:union memberTypes="myDateTime xsd:anyURI"/>
       
   147   </xsd:simpleType>
       
   148 
       
   149   <xsd:element name="dateTime">
       
   150   	  <xsd:complexType>
       
   151   	  	  <xsd:simpleContent>
       
   152   	  	  	  <xsd:extension base="myDateTimeList">
       
   153   	  	  	  		<xsd:attribute name="value" type="myDateTime" use="required"/>
       
   154   	  	  	  		<xsd:attribute name="union" type="myDateTimeUnion" use="required"/>
       
   155   	  	  	  		<xsd:attribute name="default" type="myDateTime" 
       
   156   	  	  	  			default="2004-01-21T15:30:00-05:00" use="optional"/>
       
   157   	  	  	  </xsd:extension>
       
   158   	  	  </xsd:simpleContent>
       
   159   	  </xsd:complexType>
       
   160   </xsd:element>
       
   161 
       
   162 
       
   163   <xsd:simpleType name="myTime">
       
   164   	<xsd:restriction base="xsd:time"/>
       
   165   </xsd:simpleType>
       
   166 
       
   167   <xsd:simpleType name="myTimeList">
       
   168   	<xsd:list itemType="myTime"/>
       
   169   </xsd:simpleType>
       
   170 
       
   171   <xsd:simpleType name="myTimeUnion">
       
   172   	<xsd:union memberTypes="myTime xsd:anyURI"/>
       
   173   </xsd:simpleType>
       
   174 
       
   175   <xsd:element name="time">
       
   176   	  <xsd:complexType>
       
   177   	  	  <xsd:simpleContent>
       
   178   	  	  	  <xsd:extension base="myTimeList">
       
   179   	  	  	  		<xsd:attribute name="value" type="myTime" use="required"/>
       
   180   	  	  	  		<xsd:attribute name="union" type="myTimeUnion" use="required"/>
       
   181   	  	  	  		<xsd:attribute name="default" type="myTime" 
       
   182   	  	  	  			default="15:30:00-05:00" use="optional"/>
       
   183   	  	  	  </xsd:extension>
       
   184   	  	  </xsd:simpleContent>
       
   185   	  </xsd:complexType>
       
   186   </xsd:element>
       
   187 
       
   188 
       
   189   <xsd:simpleType name="myUnion">
       
   190   	<xsd:union memberTypes="xsd:integer xsd:string"/>
       
   191   </xsd:simpleType>
       
   192 
       
   193   <xsd:simpleType name="myUnionList">
       
   194   	<xsd:list itemType="myUnion"/>
       
   195   </xsd:simpleType>
       
   196 
       
   197   <xsd:simpleType name="myUnionUnion">
       
   198   	<xsd:union memberTypes="myUnion xsd:anyURI"/>
       
   199   </xsd:simpleType>
       
   200 
       
   201   <xsd:element name="union">
       
   202   	  <xsd:complexType>
       
   203   	  	  <xsd:simpleContent>
       
   204   	  	  	  <xsd:extension base="myUnionList">
       
   205   	  	  	  		<xsd:attribute name="value" type="myUnion" use="required"/>
       
   206   	  	  	  		<xsd:attribute name="union" type="myUnionUnion" use="required"/>
       
   207   	  	  	  </xsd:extension>
       
   208   	  	  </xsd:simpleContent>
       
   209   	  </xsd:complexType>
       
   210   </xsd:element>
       
   211 
       
   212 </xsd:schema>