comparison _test/Resources/resources.xsd @ 221:e997e6fbac0b

sync: working on resources schema
author sergey
date Fri, 24 Aug 2012 16:24:14 +0400
parents 5c82c15b25b1
children 84a6382b49c8
comparison
equal deleted inserted replaced
220:5c82c15b25b1 221:e997e6fbac0b
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <schema targetNamespace="http://implab.org/schemas/resources" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://implab.org/schemas/resources"> 2 <schema targetNamespace="http://implab.org/schemas/resources"
3 <element name="resources"> 3 elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
4 <complexType> 4 xmlns:tns="http://implab.org/schemas/resources">
5 <sequence> 5 <element name="resources">
6 <element name="root" type="tns:restResource"></element> 6 <complexType>
7 <element name="typeMap" minOccurs="0"> 7 <sequence>
8 <complexType> 8 <element name="root" type="tns:restResource" />
9 <sequence> 9 <element name="typeMap" minOccurs="0">
10 <element name="item" maxOccurs="unbounded"> 10 <complexType>
11 <complexType> 11 <sequence>
12 <complexContent> 12 <element name="item" maxOccurs="unbounded">
13 <extension 13 <complexType>
14 base="tns:restResource"> 14 <complexContent>
15 <sequence></sequence> 15 <extension base="tns:restResource">
16 <attribute 16 <sequence></sequence>
17 name="type" type="string"> 17 <attribute name="type" type="string">
18 </attribute> 18 </attribute>
19 </extension> 19 </extension>
20 </complexContent> 20 </complexContent>
21 </complexType></element> 21 </complexType>
22 </sequence> 22 </element>
23 </complexType> 23 </sequence>
24 </element> 24 </complexType>
25 </sequence> 25 </element>
26 </complexType> 26 <element name="locators" minOccurs="0">
27 </element> 27 <complexType>
28 28 <sequence>
29 <!-- abstract types --> 29 <element name="locator" maxOccurs="unbounded">
30 <complexType name="abstractBinding" abstract="true"/> 30 <complexType>
31 <complexType name="abstractTransformation" abstract="true" /> 31 <complexContent>
32 <complexType name="abstractResult" abstract="true" /> 32 <extension base="tns:resourceLocator">
33 33 <attribute name="name" />
34 <complexType name="restResource"> 34 </extension>
35 <sequence> 35 </complexContent>
36 <element name="get" type="tns:restOperation" minOccurs="0"/> 36 </complexType>
37 <element name="post" type="tns:restOperation" minOccurs="0"/> 37 </element>
38 <element name="put" type="tns:restOperation" minOccurs="0"/> 38 </sequence>
39 <element name="delete" type="tns:restOperation" minOccurs="0"/> 39 </complexType>
40 <element name="resource" type="string" maxOccurs="unbounded" minOccurs="0"/> 40 </element>
41 </sequence> 41 </sequence>
42 </complexType> 42 </complexType>
43 43 <keyref name="locator-key-ref" refer="tns:locator-key">
44 <complexType name="restOperation"> 44 <selector xpath=".//tns:response/tns:locatorRef" />
45 <sequence> 45 <field xpath="@ref" />
46 <element name="bind" type="tns:methodBinding"/> 46 </keyref>
47 <element name="parameters" type="tns:transformation" minOccurs="0"/> 47 <key name="locator-key">
48 <element name="result" type="tns:abstractResult" minOccurs="0"/> 48 <selector xpath="tns:locators/tns:locator" />
49 </sequence> 49 <field xpath="@name" />
50 </complexType> 50 </key>
51 51 </element>
52 <complexType name="methodBinding" > 52
53 <sequence> 53 <!-- abstract types -->
54 <element name="var" type="tns:bindingVariable" minOccurs="0" maxOccurs="unbounded"/> 54 <complexType name="abstractBinding" abstract="true" />
55 </sequence> 55 <complexType name="abstractTransformation" abstract="true" />
56 <attribute name="text" type="string" use="required" /> 56 <complexType name="abstractResult" abstract="true" />
57 </complexType> 57
58 58 <complexType name="restResource">
59 <complexType name="bindingVariable"> 59 <sequence>
60 <complexContent> 60 <element name="get" type="tns:restOperation" minOccurs="0" />
61 <extension base="tns:methodBinding"> 61 <element name="post" type="tns:restOperation" minOccurs="0" />
62 <attribute name="name" type="string"/> 62 <element name="put" type="tns:restOperation" minOccurs="0" />
63 </extension> 63 <element name="delete" type="tns:restOperation" minOccurs="0" />
64 </complexContent> 64 <element name="resource" maxOccurs="unbounded"
65 </complexType> 65 minOccurs="0" >
66 66 <complexType>
67 67 <complexContent>
68 <complexType name="transformation"> 68 <extension base="tns:restResource">
69 <attribute name="class" type="string" /> 69 </extension>
70 </complexType> 70 </complexContent>
71 71 </complexType>
72 <complexType name="resourceLocator"> 72 </element>
73 <sequence> 73 </sequence>
74 <element name="var" type="tns:bindingVariable" minOccurs="0" maxOccurs="unbounded"/> 74 </complexType>
75 <element name="template" type="string" /> 75
76 </sequence> 76 <complexType name="restOperation">
77 </complexType> 77 <sequence>
78 78 <element name="bind" type="tns:methodBinding" />
79 <simpleType name="redirectCodes"> 79 <element name="parameters" type="tns:transformation"
80 <restriction base="string"> 80 minOccurs="0" />
81 <enumeration value="moved-permanently"/> 81 <element name="response" type="tns:abstractResult" minOccurs="0" />
82 <enumeration value="temporary-redirect"/> 82 </sequence>
83 <enumeration value="see-other"/> 83 </complexType>
84 </restriction> 84
85 </simpleType> 85 <complexType name="methodBinding">
86 86 <sequence>
87 <complexType name="redirectResult"> 87 <element name="var" type="tns:bindingVariable" minOccurs="0"
88 <complexContent> 88 maxOccurs="unbounded" />
89 <extension base="tns:abstractResult"> 89 </sequence>
90 <sequence> 90 <attribute name="text" type="string" use="required" />
91 <element name="locator" type="tns:resourceLocator" /> 91 </complexType>
92 <element name="status" type="tns:redirectCodes" minOccurs="0"/> 92
93 </sequence> 93 <complexType name="bindingVariable">
94 </extension> 94 <complexContent>
95 </complexContent> 95 <extension base="tns:methodBinding">
96 </complexType> 96 <attribute name="name" type="string" />
97 </extension>
98 </complexContent>
99 </complexType>
100
101
102 <complexType name="transformation">
103 <attribute name="class" type="string" />
104 </complexType>
105
106 <complexType name="resourceLocator">
107 <sequence>
108 <element name="var" type="tns:bindingVariable" minOccurs="0"
109 maxOccurs="unbounded" />
110 <element name="template" type="string" />
111 </sequence>
112 </complexType>
113
114 <simpleType name="redirectCodes">
115 <restriction base="string">
116 <enumeration value="moved-permanently" />
117 <enumeration value="temporary-redirect" />
118 <enumeration value="see-other" />
119 </restriction>
120 </simpleType>
121
122 <complexType name="redirectResult">
123 <complexContent>
124 <extension base="tns:abstractResult">
125 <choice>
126 <element name="locator" type="tns:resourceLocator" />
127 <element name="locatorRef">
128 <complexType>
129 <attribute name="ref" type="string" />
130 </complexType>
131 </element>
132 <element name="status" type="tns:redirectCodes" minOccurs="0" />
133 </choice>
134 </extension>
135 </complexContent>
136 </complexType>
97 137
98 </schema> 138 </schema>