comparison _test/Resources/resources.xsd @ 222:84a6382b49c8

resources schema in progress
author sergey
date Mon, 27 Aug 2012 17:28:32 +0400
parents e997e6fbac0b
children edf011437be8
comparison
equal deleted inserted replaced
221:e997e6fbac0b 222:84a6382b49c8
3 elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" 3 elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
4 xmlns:tns="http://implab.org/schemas/resources"> 4 xmlns:tns="http://implab.org/schemas/resources">
5 <element name="resources"> 5 <element name="resources">
6 <complexType> 6 <complexType>
7 <sequence> 7 <sequence>
8 <element name="root" type="tns:restResource" /> 8 <element name="root" type="tns:resourceContract" />
9 <element name="typeMap" minOccurs="0"> 9 <element name="typeMap" minOccurs="0">
10 <complexType> 10 <complexType>
11 <sequence> 11 <sequence>
12 <element name="item" maxOccurs="unbounded"> 12 <element name="contract" maxOccurs="unbounded">
13 <complexType> 13 <complexType>
14 <complexContent> 14 <complexContent>
15 <extension base="tns:restResource"> 15 <extension base="tns:resourceContract">
16 <sequence></sequence> 16 <sequence></sequence>
17 <attribute name="type" type="string"> 17 <attribute name="type" type="string" use="required">
18 </attribute> 18 </attribute>
19 </extension> 19 </extension>
20 </complexContent> 20 </complexContent>
21 </complexType> 21 </complexType>
22 </element> 22 </element>
28 <sequence> 28 <sequence>
29 <element name="locator" maxOccurs="unbounded"> 29 <element name="locator" maxOccurs="unbounded">
30 <complexType> 30 <complexType>
31 <complexContent> 31 <complexContent>
32 <extension base="tns:resourceLocator"> 32 <extension base="tns:resourceLocator">
33 <attribute name="name" /> 33 <attribute name="name" type="string" />
34 </extension> 34 </extension>
35 </complexContent> 35 </complexContent>
36 </complexType> 36 </complexType>
37 </element> 37 </element>
38 </sequence> 38 </sequence>
43 <keyref name="locator-key-ref" refer="tns:locator-key"> 43 <keyref name="locator-key-ref" refer="tns:locator-key">
44 <selector xpath=".//tns:response/tns:locatorRef" /> 44 <selector xpath=".//tns:response/tns:locatorRef" />
45 <field xpath="@ref" /> 45 <field xpath="@ref" />
46 </keyref> 46 </keyref>
47 <key name="locator-key"> 47 <key name="locator-key">
48 <selector xpath="tns:locators/tns:locator" /> 48 <selector xpath="tns:locators/tns:locator" />
49 <field xpath="@name" /> 49 <field xpath="@name" />
50 </key> 50 </key>
51 </element> 51 </element>
52 52
53 <!-- abstract types --> 53 <!-- abstract types -->
54 <complexType name="abstractBinding" abstract="true" /> 54 <complexType name="abstractBinding" abstract="true" />
55 <complexType name="abstractTransformation" abstract="true" /> 55 <complexType name="abstractTransformation" abstract="true" />
56 <complexType name="abstractResult" abstract="true" /> 56 <complexType name="abstractResult" abstract="true" />
57 57
58 <complexType name="restResource"> 58 <complexType name="resourceContract">
59 <sequence> 59 <sequence>
60 <element name="get" type="tns:restOperation" minOccurs="0" /> 60 <group ref="tns:restOperations"></group>
61 <element name="post" type="tns:restOperation" minOccurs="0" /> 61 <element name="resource" maxOccurs="unbounded" minOccurs="0">
62 <element name="put" type="tns:restOperation" minOccurs="0" />
63 <element name="delete" type="tns:restOperation" minOccurs="0" />
64 <element name="resource" maxOccurs="unbounded"
65 minOccurs="0" >
66 <complexType> 62 <complexType>
67 <complexContent> 63 <sequence>
68 <extension base="tns:restResource"> 64 <element name="contract" type="tns:resourceContract" />
69 </extension> 65 </sequence>
70 </complexContent> 66 <attribute name="name" type="string" />
71 </complexType> 67 </complexType>
72 </element> 68 </element>
73 </sequence> 69 </sequence>
74 </complexType> 70 </complexType>
75 71
76 <complexType name="restOperation"> 72 <group name="restOperations">
73 <sequence>
74 <element name="get" type="tns:operationContract" minOccurs="0" />
75 <element name="post" type="tns:operationContract" minOccurs="0" />
76 <element name="put" type="tns:operationContract" minOccurs="0" />
77 <element name="delete" type="tns:operationContract"
78 minOccurs="0" />
79 </sequence>
80 </group>
81
82 <complexType name="operationContract">
77 <sequence> 83 <sequence>
78 <element name="bind" type="tns:methodBinding" /> 84 <element name="bind" type="tns:methodBinding" />
79 <element name="parameters" type="tns:transformation" 85 <element name="parameters" type="tns:transformation"
80 minOccurs="0" /> 86 minOccurs="0" />
81 <element name="response" type="tns:abstractResult" minOccurs="0" /> 87 <element name="response" type="tns:abstractResult" minOccurs="0" />
85 <complexType name="methodBinding"> 91 <complexType name="methodBinding">
86 <sequence> 92 <sequence>
87 <element name="var" type="tns:bindingVariable" minOccurs="0" 93 <element name="var" type="tns:bindingVariable" minOccurs="0"
88 maxOccurs="unbounded" /> 94 maxOccurs="unbounded" />
89 </sequence> 95 </sequence>
90 <attribute name="text" type="string" use="required" /> 96 <attribute name="bind" type="string" use="required" />
91 </complexType> 97 </complexType>
92 98
93 <complexType name="bindingVariable"> 99 <complexType name="bindingVariable">
94 <complexContent> 100 <complexContent>
95 <extension base="tns:methodBinding"> 101 <extension base="tns:methodBinding">
117 <enumeration value="temporary-redirect" /> 123 <enumeration value="temporary-redirect" />
118 <enumeration value="see-other" /> 124 <enumeration value="see-other" />
119 </restriction> 125 </restriction>
120 </simpleType> 126 </simpleType>
121 127
122 <complexType name="redirectResult"> 128 <complexType name="redirectResponse">
123 <complexContent> 129 <complexContent>
124 <extension base="tns:abstractResult"> 130 <extension base="tns:abstractResult">
125 <choice> 131 <choice>
126 <element name="locator" type="tns:resourceLocator" /> 132 <element name="locator" type="tns:resourceLocator" />
127 <element name="locatorRef"> 133 <element name="locatorRef">