comparison _test/Resources/resources.xsd @ 219:c477f24f1980

sync
author sergey
date Tue, 21 Aug 2012 17:13:47 +0400
parents 358f867712b4
children 5c82c15b25b1
comparison
equal deleted inserted replaced
218:358f867712b4 219:c477f24f1980
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <schema targetNamespace="uri:impl-web-application/resources" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="uri:impl-web-application/resources"> 2 <schema targetNamespace="http://implab.org/schemas/resources" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://implab.org/schemas/resources">
3 <element name="resources"> 3 <element name="resources">
4 <complexType> 4 <complexType>
5 <sequence> 5 <sequence>
6 <element name="root" type="tns:restResource"></element> 6 <element name="root" type="tns:restResource"></element>
7 <element name="typeMap"> 7 <element name="typeMap" minOccurs="0">
8 <complexType> 8 <complexType>
9 <sequence> 9 <sequence>
10 <element name="item"> 10 <element name="item" maxOccurs="unbounded">
11 <complexType> 11 <complexType>
12 <complexContent> 12 <complexContent>
13 <extension 13 <extension
14 base="tns:restResource"> 14 base="tns:restResource">
15 <sequence></sequence> 15 <sequence></sequence>
23 </complexType></element> 23 </complexType></element>
24 </sequence> 24 </sequence>
25 </complexType> 25 </complexType>
26 </element> 26 </element>
27 27
28 <!-- abstract types -->
29 <complexType name="abstractBinding" abstract="true"/>
30 <complexType name="abstractTransformation" abstract="true" />
31 <complexType name="abstractResult" abstract="true" />
32
28 <complexType name="restResource"> 33 <complexType name="restResource">
29 <sequence> 34 <sequence>
30 <element name="get" type="tns:restOperation" minOccurs="0"> 35 <element name="get" type="tns:restOperation" minOccurs="0">
31 </element> 36 </element>
32 <element name="post" type="tns:restOperation" minOccurs="0"> 37 <element name="post" type="tns:restOperation" minOccurs="0">
39 </sequence> 44 </sequence>
40 </complexType> 45 </complexType>
41 46
42 <complexType name="restOperation"> 47 <complexType name="restOperation">
43 <sequence> 48 <sequence>
44 <element name="invoke" type="string"></element> 49 <element ref="tns:abstractBinding"/>
45 <element name="parameters" type="string"></element> 50 <element name="parameters" type="string"></element>
46 <element name="result" type="string"></element> 51 <element ref="tns:abstractResult"/>
47 </sequence> 52 </sequence>
48 </complexType> 53 </complexType>
54
55 <complexType name="methodBinding" >
56 <complexContent>
57 <extension base="tns:abstractBinding">
58 <attribute name="target" type="string" />
59 <attribute name="invoke" type="string" use="required" />
60 </extension>
61 </complexContent>
62 </complexType>
63
64 <complexType name="transformation">
65 <attribute name="class" type="string" />
66 </complexType>
67
68 <complexType name="resourceLocator">
69 <sequence>
70 <element ref="tns:abstractBinding" />
71 <element name="template" type="string" />
72 </sequence>
73 </complexType>
74
75
76
77
78 <!-- substitutions -->
79
80 <!-- abstract -->
81 <element name="abstractBinding" type="tns:abstractBinding" abstract="true"/>
82 <element name="abstractTransfomation" type="tns:abstractTransformation" />
83 <element name="abstractResult" type="tns:abstractResult" abstract="true" />
84
85 <!-- specific -->
86
87 <!-- bindings -->
88 <element name="bind" type="tns:methodBinding" substitutionGroup="tns:abstractBinding"/>
89
90 <!-- transformation -->
91
92 <!-- result handlers -->
93 <simpleType name="redirectCodes">
94 <restriction base="string">
95 <enumeration value="moved-permanently"/>
96 <enumeration value="temporary-redirect"/>
97 <enumeration value="see-other"/>
98 </restriction>
99 </simpleType>
100
101 <complexType name="redirectResult">
102 <complexContent>
103 <extension base="tns:abstractResult">
104 <sequence>
105 <element name="locator" type="tns:resourceLocator" />
106 <element name="status" type="tns:redirectCodes" minOccurs="0"/>
107 </sequence>
108 </extension>
109 </complexContent>
110 </complexType>
111
112 <element name="redirect" type="tns:redirectResult" substitutionGroup="tns:abstractResult" />
113
49 </schema> 114 </schema>