summaryrefslogtreecommitdiffstats
path: root/java/sdo-cts/sdo2.1/src/main/resources/api_test.xsd
blob: c740060161829a367d0edafc60d770a12673608c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?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 xmlns:sdo="commonj.sdo" xmlns:sdoXML="commonj.sdo/xml" xmlns:api="http://www.example.com/api_test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/api_test"> 
    <!-- <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>  -->
    
     <xsd:element name="apiTestElem" type="api:APITest"/>
     
     <xsd:complexType name="APITest">
       <xsd:sequence>
          <xsd:element name="stringVal" type="xsd:string"/>
          <xsd:element name="booleanVal" type="xsd:boolean"/>
          <xsd:element name="booleanVal2" type="xsd:boolean"/>
          <xsd:element name="byteVal" type="xsd:byte"/>       
          <xsd:element name="stringVal2" type="xsd:string"/>
          <xsd:element name="decimalVal" type="xsd:decimal"/>
          <xsd:element name="decimalVal2" sdo:aliasName="dec2" type="xsd:decimal"/>
          <xsd:element name="intVal" type="xsd:int"/>
          <xsd:element name="floatVal" type="xsd:float"/>
          <xsd:element name="doubleVal" type="xsd:double"/>
          <xsd:element name="dateVal" type="xsd:dateTime"/>
          <xsd:element name="shortVal" type="xsd:short"/>
          <xsd:element name="longVal" type="xsd:long"/>
          <xsd:element maxOccurs="unbounded" minOccurs="0" name="containMany" type="api:APITest"/>
          <xsd:element name="bytesVal" type="xsd:hexBinary"/>
          <xsd:element name="integerVal" type="xsd:integer"/>
          <xsd:element name="charVal" type="api:char"/>
          <xsd:element name="readOnlyVal" type="xsd:string" sdoXML:readOnly="true"/>
          <xsd:element name="sequencedElem" type="api:Sequenced"/>
          <xsd:element name="extendedElem" type="api:Extended"/> 
          <xsd:element name="openElem" type="api:Open"/>
          <xsd:element name="contain" type="api:APITest"/>        
       </xsd:sequence>
   </xsd:complexType>
      
   <xsd:complexType name="Sequenced" mixed="true">
      <xsd:sequence>
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="Numbers" type="xsd:int"/>
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="Letters" type="xsd:string"/>
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="containMany" type="api:Sequenced"/>
         <xsd:element name="contain" type="api:Sequenced"/>  
      </xsd:sequence>
   </xsd:complexType>
   
   <xsd:complexType name="Open">
      <xsd:sequence>
         <xsd:element name="defined" type="xsd:string"/>
         <xsd:any maxOccurs="unbounded" namespace="##any"/>
      </xsd:sequence>
   </xsd:complexType>
   
   <xsd:simpleType name="char">
      <xsd:restriction base="xsd:string">
         <xsd:length value="1"/>
      </xsd:restriction>
   </xsd:simpleType>
   
   <xsd:complexType abstract="true" name="Abstract">
     <xsd:sequence>
       <xsd:element name="firstName" type="xsd:string"/>
       <xsd:element name="lastName" type="xsd:string"/>
     </xsd:sequence>
   </xsd:complexType>
   
   <xsd:complexType name="Extended" sdo:aliasName="Ext2">
     <xsd:complexContent>
       <xsd:extension base="api:Abstract">
         <xsd:sequence>
            <xsd:element name="nickName" type="xsd:string"/>
            <xsd:element name="middleName" type="xsd:string"/>
         </xsd:sequence>
       </xsd:extension>
     </xsd:complexContent>
   </xsd:complexType>
   
</xsd:schema>