diff options
Diffstat (limited to 'sdo-java/trunk-cts/sdo2.1/src/main/resources/dynamicTypesFromSchema.xsd')
-rw-r--r-- | sdo-java/trunk-cts/sdo2.1/src/main/resources/dynamicTypesFromSchema.xsd | 199 |
1 files changed, 199 insertions, 0 deletions
diff --git a/sdo-java/trunk-cts/sdo2.1/src/main/resources/dynamicTypesFromSchema.xsd b/sdo-java/trunk-cts/sdo2.1/src/main/resources/dynamicTypesFromSchema.xsd new file mode 100644 index 0000000000..03c0ff49f6 --- /dev/null +++ b/sdo-java/trunk-cts/sdo2.1/src/main/resources/dynamicTypesFromSchema.xsd @@ -0,0 +1,199 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/dynamicTypesFromSchema" + xmlns:dtfs="http://www.example.com/dynamicTypesFromSchema" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <!-- + elements and types for testElement0 + provides examples of using XML Schema primitive datatypes (see 3.2 of XML Schema Part 2) + (QName and NOTATION omitted as they are not appropriate as types for element content.) + --> + + <xsd:complexType name="TestType0" mixed="true"> + <xsd:sequence> + <xsd:element name="string" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/> + <xsd:element name="boolean" minOccurs="0" maxOccurs="unbounded" type="xsd:boolean"/> + <xsd:element name="decimal" minOccurs="0" maxOccurs="unbounded" type="xsd:decimal"/> + <xsd:element name="float" minOccurs="0" maxOccurs="unbounded" type="xsd:float"/> + <xsd:element name="double" minOccurs="0" maxOccurs="unbounded" type="xsd:double"/> + <xsd:element name="duration" minOccurs="0" maxOccurs="unbounded" type="xsd:duration"/> + <xsd:element name="dateTime" minOccurs="0" maxOccurs="unbounded" type="xsd:dateTime"/> + <xsd:element name="time" minOccurs="0" maxOccurs="unbounded" type="xsd:time"/> + <xsd:element name="date" minOccurs="0" maxOccurs="unbounded" type="xsd:date"/> + <xsd:element name="gYearMonth" minOccurs="0" maxOccurs="unbounded" type="xsd:gYearMonth"/> + <xsd:element name="gYear" minOccurs="0" maxOccurs="unbounded" type="xsd:gYear"/> + <xsd:element name="gMonthDay" minOccurs="0" maxOccurs="unbounded" type="xsd:gMonthDay"/> + <xsd:element name="gDay" minOccurs="0" maxOccurs="unbounded" type="xsd:gDay"/> + <xsd:element name="gMonth" minOccurs="0" maxOccurs="unbounded" type="xsd:gMonth"/> + <xsd:element name="hexBinary" minOccurs="0" maxOccurs="unbounded" type="xsd:hexBinary"/> + <xsd:element name="base64Binary" minOccurs="0" maxOccurs="unbounded" type="xsd:base64Binary"/> + <xsd:element name="anyURI" minOccurs="0" maxOccurs="unbounded" type="xsd:anyURI"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="testElement0" type="dtfs:TestType0"/> + + <!-- + elements and types for testElement1 + provides examples of using XML Schema derived datatypes (see 3.3 of XML Schema Part 2) + (ENTITY and ENTITIES omitted as they are not appropriate as types for element content.) + --> + + <xsd:complexType name="TestType1" mixed="true"> + <xsd:sequence> + <xsd:element name="normalizedString" minOccurs="0" maxOccurs="unbounded" type="xsd:normalizedString"/> + <xsd:element name="token" minOccurs="0" maxOccurs="unbounded" type="xsd:token"/> + <xsd:element name="language" minOccurs="0" maxOccurs="unbounded" type="xsd:language"/> + <xsd:element name="NMTOKEN" minOccurs="0" maxOccurs="unbounded" type="xsd:NMTOKEN"/> + <xsd:element name="NMTOKENS" minOccurs="0" maxOccurs="unbounded" type="xsd:NMTOKENS"/> + <xsd:element name="Name" minOccurs="0" maxOccurs="unbounded" type="xsd:Name"/> + <xsd:element name="NCName" minOccurs="0" maxOccurs="unbounded" type="xsd:NCName"/> + <xsd:element name="ID" minOccurs="0" maxOccurs="unbounded" type="xsd:ID"/> + <xsd:element name="IDREF" minOccurs="0" maxOccurs="unbounded" type="xsd:IDREF"/> + <xsd:element name="IDREFS" minOccurs="0" maxOccurs="unbounded" type="xsd:IDREFS"/> + <xsd:element name="integer" minOccurs="0" maxOccurs="unbounded" type="xsd:integer"/> + <xsd:element name="nonPositiveInteger" minOccurs="0" maxOccurs="unbounded" type="xsd:nonPositiveInteger"/> + <xsd:element name="negativeInteger" minOccurs="0" maxOccurs="unbounded" type="xsd:negativeInteger"/> + <xsd:element name="long" minOccurs="0" maxOccurs="unbounded" type="xsd:long"/> + <xsd:element name="int" minOccurs="0" maxOccurs="unbounded" type="xsd:int"/> + <xsd:element name="short" minOccurs="0" maxOccurs="unbounded" type="xsd:short"/> + <xsd:element name="byte" minOccurs="0" maxOccurs="unbounded" type="xsd:byte"/> + <xsd:element name="nonNegativeInteger" minOccurs="0" maxOccurs="unbounded" type="xsd:nonNegativeInteger"/> + <xsd:element name="unsignedLong" minOccurs="0" maxOccurs="unbounded" type="xsd:unsignedLong"/> + <xsd:element name="unsignedInt" minOccurs="0" maxOccurs="unbounded" type="xsd:unsignedInt"/> + <xsd:element name="unsignedShort" minOccurs="0" maxOccurs="unbounded" type="xsd:unsignedShort"/> + <xsd:element name="unsignedByte" minOccurs="0" maxOccurs="unbounded" type="xsd:unsignedByte"/> + <xsd:element name="positiveInteger" minOccurs="0" maxOccurs="unbounded" type="xsd:positiveInteger"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="testElement1" type="dtfs:TestType1"/> + + <!-- + elements and types for testElement2 + provides examples of deriving new types by restriction + --> + + <xsd:simpleType name="month"> + <xsd:restriction base="xsd:int"> + <xsd:minInclusive value="1"/> + <xsd:maxInclusive value="12"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="status"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="unspecified"/> + <xsd:enumeration value="Good"/> + <xsd:enumeration value="Indifferent"/> + <xsd:enumeration value="Bad"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="smallOddNumber"> + <xsd:restriction base="xsd:int"> + <xsd:enumeration value="1"/> + <xsd:enumeration value="3"/> + <xsd:enumeration value="5"/> + <xsd:enumeration value="7"/> + <xsd:enumeration value="9"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="oddOrEvenDigits"> + <xsd:restriction base="xsd:int"> + <xsd:pattern value="[13579]*"/> + <xsd:pattern value="[02468]*"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="evenNumberOfOddOrEvenDigits"> + <xsd:restriction base="dtfs:oddOrEvenDigits"> + <xsd:pattern value="(..)*"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="smallBigDecimal"> + <xsd:restriction base="xsd:decimal"> + <xsd:totalDigits value="10"/> + <xsd:fractionDigits value="2"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="smallBigInteger"> + <xsd:restriction base="xsd:integer"> + <xsd:totalDigits value="10"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="smallInt"> + <xsd:restriction base="xsd:int"> + <xsd:totalDigits value="2"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="monthList"> + <xsd:list itemType="dtfs:month"/> + </xsd:simpleType> + + <xsd:simpleType name="statusOrMonthList"> + <xsd:union memberTypes="dtfs:status dtfs:monthList"/> + </xsd:simpleType> + + <xsd:complexType name="Address"> + <xsd:attribute name="ip" type="xsd:ID"/> + </xsd:complexType> + + <xsd:complexType name="Component"> + <xsd:sequence> + <xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="from" use="required" type="xsd:IDREF"/> + <xsd:attribute name="to" use="required" type="xsd:IDREFS"/> + <xsd:attribute name="cc" type="xsd:IDREFS"/> + <xsd:attribute name="bcc" type="xsd:IDREFS"/> + <xsd:attribute name="status" type="dtfs:status"/> + </xsd:complexType> + + <xsd:complexType name="TestType2" mixed="true"> + <xsd:sequence> + <xsd:element name="smallBigDecimal" minOccurs="0" type="dtfs:smallBigDecimal"/> + <xsd:element name="smallBigInteger" minOccurs="0" type="dtfs:smallBigInteger"/> + <xsd:element name="smallInt" minOccurs="0" type="dtfs:smallInt"/> + <xsd:element name="wierdNumber" minOccurs="0" type="dtfs:evenNumberOfOddOrEvenDigits" default="11"/> + <xsd:element name="smallOddNumber" minOccurs="0" type="dtfs:smallOddNumber"/> + <xsd:element name="headerValue" nillable="true" minOccurs="0" type="xsd:int"/> + <xsd:element name="overallStatus" nillable="true" minOccurs="0" type="dtfs:status"/> + <xsd:element name="addresses" minOccurs="1" maxOccurs="unbounded" type="dtfs:Address"/> + <xsd:element name="components" minOccurs="1" maxOccurs="unbounded" type="dtfs:Component"/> + <xsd:element name="item" type="xsd:IDREF"/> + <xsd:element name="items" maxOccurs="unbounded" type="xsd:IDREF"/> + <xsd:element name="cluster" type="xsd:IDREFS"/> + <xsd:element name="clusters" maxOccurs="unbounded" type="xsd:IDREFS"/> + <xsd:element name="statusOrMonthList" minOccurs="0" maxOccurs="unbounded" type="dtfs:statusOrMonthList"/> + <xsd:element ref="dtfs:nCName" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="nCName" type="xsd:NCName"/> + + <xsd:element name="testElement2" type="dtfs:TestType2"/> + +</xsd:schema> |