comparison _test/Resources/resources.xsd @ 224:e6c050db7d98

resources schema update
author sergey
date Wed, 29 Aug 2012 17:28:13 +0400
parents edf011437be8
children b6cde007a175
comparison
equal deleted inserted replaced
223:edf011437be8 224:e6c050db7d98
11 <sequence> 11 <sequence>
12 <element name="contract" maxOccurs="unbounded"> 12 <element name="contract" maxOccurs="unbounded">
13 <complexType> 13 <complexType>
14 <complexContent> 14 <complexContent>
15 <extension base="tns:ResourceContract"> 15 <extension base="tns:ResourceContract">
16 <all>
17 <element name="modelType" type="tns:ClassName" />
18 </all>
19 <attribute name="id" type="string" /> 16 <attribute name="id" type="string" />
20 </extension> 17 <attribute name="modelType" type="tns:ClassName"/>
21 </complexContent>
22 </complexType>
23 </element>
24 </sequence>
25 </complexType>
26 </element>
27 <element name="locators" minOccurs="0">
28 <complexType>
29 <sequence>
30 <element name="locator" maxOccurs="unbounded">
31 <complexType>
32 <complexContent>
33 <extension base="tns:ResourceLocator">
34 <attribute name="name" type="string" />
35 </extension> 18 </extension>
36 </complexContent> 19 </complexContent>
37 </complexType> 20 </complexType>
38 </element> 21 </element>
39 </sequence> 22 </sequence>
40 </complexType> 23 </complexType>
41 </element> 24 </element>
42 </sequence> 25 </sequence>
43 </complexType> 26 </complexType>
44 <keyref name="locator-key-ref" refer="tns:locator-key">
45 <selector xpath=".//tns:response/tns:locatorRef" />
46 <field xpath="@ref" />
47 </keyref>
48 <key name="locator-key">
49 <selector xpath="tns:locators/tns:locator" />
50 <field xpath="@name" />
51 </key>
52 </element> 27 </element>
53 28
54 <!-- abstract types --> 29 <!-- abstract types -->
55 <complexType name="AbstractBinding" abstract="true" /> 30 <complexType name="AbstractBinding" abstract="true" />
56 <complexType name="AbstractTransformation" abstract="true" /> 31 <complexType name="AbstractTransformation" abstract="true" />
99 74
100 <complexType name="OperationContract"> 75 <complexType name="OperationContract">
101 <complexContent> 76 <complexContent>
102 <extension base="tns:MethodBinding"> 77 <extension base="tns:MethodBinding">
103 <sequence> 78 <sequence>
104 <element name="response" type="tns:AbstractResult" 79 <element name="response" minOccurs="0">
105 minOccurs="0" /> 80 <complexType>
81 <choice>
82 <element name="redirect" type="tns:RedirectResponse" />
83 <element name="transform" type="tns:Transformation"/>
84 </choice>
85 </complexType>
86 </element>
106 </sequence> 87 </sequence>
107 </extension> 88 </extension>
108 </complexContent> 89 </complexContent>
109 </complexType> 90 </complexType>
110 91
116 <attribute name="expr" type="string" use="required" /> 97 <attribute name="expr" type="string" use="required" />
117 <attribute name="handler" type="string" /> 98 <attribute name="handler" type="string" />
118 </complexType> 99 </complexType>
119 100
120 <complexType name="BindingVariable"> 101 <complexType name="BindingVariable">
121 <complexContent> 102 <choice>
122 <extension base="tns:MethodBinding"> 103 <element name="bind" type="tns:MethodBinding" />
123 <attribute name="name" type="string" /> 104 <element name="transform" type="tns:Transformation" />
124 </extension> 105 </choice>
125 </complexContent> 106 <attribute name="name" type="tns:IdentifierName" use="required" />
126 </complexType> 107 </complexType>
127 108
128 109
129 <complexType name="transformation"> 110 <complexType name="Transformation">
130 <attribute name="class" type="string" /> 111 <sequence>
112 <element name="target" type="tns:MethodBinding" minOccurs="0"/>
113 <element name="transform" type="tns:Transformation" minOccurs="0"/>
114 </sequence>
115 <attribute name="class" type="tns:ClassName" use="required" />
131 </complexType> 116 </complexType>
132 117
133 <complexType name="ResourceLocator"> 118 <complexType name="ResourceLocator">
134 <sequence> 119 <attribute name="locator" type="string" use="required" />
135 <element name="var" type="tns:BindingVariable" minOccurs="0"
136 maxOccurs="unbounded" />
137 <element name="template" type="string" />
138 </sequence>
139 </complexType> 120 </complexType>
140 121
141 <simpleType name="RedirectCodes"> 122 <simpleType name="RedirectCodes">
142 <restriction base="string"> 123 <restriction base="string">
143 <enumeration value="moved-permanently" /> 124 <enumeration value="moved-permanently" />
147 </simpleType> 128 </simpleType>
148 129
149 <complexType name="RedirectResponse"> 130 <complexType name="RedirectResponse">
150 <complexContent> 131 <complexContent>
151 <extension base="tns:AbstractResult"> 132 <extension base="tns:AbstractResult">
152 <choice> 133 <sequence>
153 <element name="locator" type="tns:ResourceLocator" /> 134 <element name="location" type="tns:ResourceLocator" />
154 <element name="locatorRef">
155 <complexType>
156 <attribute name="ref" type="string" />
157 </complexType>
158 </element>
159 <element name="status" type="tns:RedirectCodes" minOccurs="0" /> 135 <element name="status" type="tns:RedirectCodes" minOccurs="0" />
160 </choice> 136 </sequence>
161 </extension> 137 </extension>
162 </complexContent> 138 </complexContent>
163 </complexType> 139 </complexType>
164 140
165 <simpleType name="ClassName"> 141 <simpleType name="ClassName">
166 <restriction base="string"> 142 <restriction base="string">
167 <pattern value="\w+(::\w+)*" /> 143 <pattern value="\w+(::\w+)*" />
168 </restriction> 144 </restriction>
169 </simpleType> 145 </simpleType>
170 146
147 <simpleType name="IdentifierName">
148 <restriction base="string">
149 <pattern value="\w+" />
150 </restriction>
151 </simpleType>
152
171 </schema> 153 </schema>