Mercurial > pub > Impl
comparison _test/Resources/resources.xsd @ 226:b6cde007a175
Added resource contract
author | sergey |
---|---|
date | Wed, 05 Sep 2012 15:10:26 +0400 |
parents | e6c050db7d98 |
children |
comparison
equal
deleted
inserted
replaced
225:a1e868b0fba9 | 226:b6cde007a175 |
---|---|
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 <attribute name="id" type="string" /> | 16 <attribute name="id" type="string" /> |
17 <attribute name="modelType" type="tns:ClassName"/> | 17 <attribute name="modelType" type="tns:ClassName" /> |
18 </extension> | 18 </extension> |
19 </complexContent> | 19 </complexContent> |
20 </complexType> | 20 </complexType> |
21 </element> | 21 </element> |
22 </sequence> | 22 </sequence> |
41 | 41 |
42 <complexType name="ChildResourceContract"> | 42 <complexType name="ChildResourceContract"> |
43 <sequence> | 43 <sequence> |
44 <choice> | 44 <choice> |
45 <element name="name" type="string" /> | 45 <element name="name" type="string" /> |
46 <element name="match" type="string" /> | 46 <element name="match"> |
47 <complexType> | |
48 <simpleContent> | |
49 <extension base="string"> | |
50 <attribute name="vars" type="tns:VarList"/> | |
51 </extension> | |
52 </simpleContent> | |
53 </complexType> | |
54 | |
55 </element> | |
47 </choice> | 56 </choice> |
48 <element name="model" minOccurs="0" type="tns:MethodBinding" /> | 57 <group ref="tns:BindingExpressions"/> |
49 <choice> | 58 <choice> |
50 <element name="contract"> | 59 <element name="contract"> |
51 <complexType> | 60 <complexType> |
52 <attribute name="ref" type="string" use="required" /> | 61 <attribute name="ref" type="string" use="required" /> |
53 </complexType> | 62 </complexType> |
69 <element name="put" type="tns:OperationContract" minOccurs="0" /> | 78 <element name="put" type="tns:OperationContract" minOccurs="0" /> |
70 <element name="delete" type="tns:OperationContract" | 79 <element name="delete" type="tns:OperationContract" |
71 minOccurs="0" /> | 80 minOccurs="0" /> |
72 </sequence> | 81 </sequence> |
73 </group> | 82 </group> |
83 | |
84 <group name="BindingExpressions"> | |
85 <choice> | |
86 <element name="bind" type="tns:Binding"/> | |
87 <element name="transform" type="tns:Transformation"/> | |
88 <element name="value" type="string" /> | |
89 </choice> | |
90 </group> | |
74 | 91 |
75 <complexType name="OperationContract"> | 92 <complexType name="OperationContract"> |
76 <complexContent> | 93 |
77 <extension base="tns:MethodBinding"> | 94 <sequence> |
78 <sequence> | 95 <element name="bind" type="tns:Binding" /> |
79 <element name="response" minOccurs="0"> | 96 <element name="response" minOccurs="0"> |
80 <complexType> | 97 <complexType> |
81 <choice> | 98 <choice> |
82 <element name="redirect" type="tns:RedirectResponse" /> | 99 <element name="redirect" type="tns:RedirectResponse" /> |
83 <element name="transform" type="tns:Transformation"/> | 100 <element name="transform" type="tns:Transformation" /> |
84 </choice> | 101 </choice> |
85 </complexType> | 102 </complexType> |
86 </element> | 103 </element> |
87 </sequence> | 104 </sequence> |
88 </extension> | 105 |
89 </complexContent> | |
90 </complexType> | 106 </complexType> |
91 | 107 |
92 <complexType name="MethodBinding"> | 108 <complexType name="Binding"> |
93 <sequence> | 109 <sequence> |
94 <element name="var" type="tns:BindingVariable" minOccurs="0" | 110 <element name="var" type="tns:BindingVariable" minOccurs="0" |
95 maxOccurs="unbounded" /> | 111 maxOccurs="unbounded" /> |
96 </sequence> | 112 </sequence> |
97 <attribute name="expr" type="string" use="required" /> | 113 <attribute name="expr" type="string" use="required" /> |
98 <attribute name="handler" type="string" /> | 114 <attribute name="handler" type="string" /> |
99 </complexType> | 115 </complexType> |
100 | 116 |
101 <complexType name="BindingVariable"> | 117 <complexType name="BindingVariable"> |
102 <choice> | 118 <choice> |
103 <element name="bind" type="tns:MethodBinding" /> | 119 <element name="bind" type="tns:Binding" /> |
104 <element name="transform" type="tns:Transformation" /> | 120 <element name="transform" type="tns:Transformation" /> |
121 <element name="value" type="string" /> | |
105 </choice> | 122 </choice> |
106 <attribute name="name" type="tns:IdentifierName" use="required" /> | 123 <attribute name="name" type="tns:IdentifierName" use="required" /> |
107 </complexType> | 124 </complexType> |
108 | 125 |
109 | 126 |
110 <complexType name="Transformation"> | 127 <complexType name="Transformation"> |
111 <sequence> | 128 <sequence> |
112 <element name="target" type="tns:MethodBinding" minOccurs="0"/> | 129 <element name="target" type="tns:Binding" minOccurs="0" /> |
113 <element name="transform" type="tns:Transformation" minOccurs="0"/> | 130 <element name="transform" type="tns:Transformation" |
114 </sequence> | 131 minOccurs="0" /> |
132 </sequence> | |
115 <attribute name="class" type="tns:ClassName" use="required" /> | 133 <attribute name="class" type="tns:ClassName" use="required" /> |
116 </complexType> | 134 </complexType> |
117 | 135 |
118 <complexType name="ResourceLocator"> | 136 <complexType name="ResourceLocator"> |
119 <attribute name="locator" type="string" use="required" /> | 137 <attribute name="locator" type="string" use="required" /> |
147 <simpleType name="IdentifierName"> | 165 <simpleType name="IdentifierName"> |
148 <restriction base="string"> | 166 <restriction base="string"> |
149 <pattern value="\w+" /> | 167 <pattern value="\w+" /> |
150 </restriction> | 168 </restriction> |
151 </simpleType> | 169 </simpleType> |
170 | |
171 <simpleType name="VarList"> | |
172 <restriction base="string"> | |
173 <pattern value="(\w+)(\s*,\s*(\w+))*" /> | |
174 </restriction> | |
175 </simpleType> | |
152 | 176 |
153 </schema> | 177 </schema> |