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

resources schema update
author sergey
date Wed, 29 Aug 2012 17:28:13 +0400
parents edf011437be8
children b6cde007a175
line wrap: on
line diff
--- a/_test/Resources/resources.xsd	Tue Aug 28 17:29:42 2012 +0400
+++ b/_test/Resources/resources.xsd	Wed Aug 29 17:28:13 2012 +0400
@@ -13,25 +13,8 @@
 								<complexType>
 									<complexContent>
 										<extension base="tns:ResourceContract">
-											<all>
-												<element name="modelType" type="tns:ClassName" />
-											</all>
 											<attribute name="id" type="string" />
-										</extension>
-									</complexContent>
-								</complexType>
-							</element>
-						</sequence>
-					</complexType>
-				</element>
-				<element name="locators" minOccurs="0">
-					<complexType>
-						<sequence>
-							<element name="locator" maxOccurs="unbounded">
-								<complexType>
-									<complexContent>
-										<extension base="tns:ResourceLocator">
-											<attribute name="name" type="string" />
+											<attribute name="modelType" type="tns:ClassName"/>
 										</extension>
 									</complexContent>
 								</complexType>
@@ -41,14 +24,6 @@
 				</element>
 			</sequence>
 		</complexType>
-		<keyref name="locator-key-ref" refer="tns:locator-key">
-			<selector xpath=".//tns:response/tns:locatorRef" />
-			<field xpath="@ref" />
-		</keyref>
-		<key name="locator-key">
-			<selector xpath="tns:locators/tns:locator" />
-			<field xpath="@name" />
-		</key>
 	</element>
 
 	<!-- abstract types -->
@@ -101,8 +76,14 @@
 		<complexContent>
 			<extension base="tns:MethodBinding">
 				<sequence>
-					<element name="response" type="tns:AbstractResult"
-						minOccurs="0" />
+					<element name="response" minOccurs="0">
+					   <complexType>
+					       <choice>
+					           <element name="redirect" type="tns:RedirectResponse" />
+					           <element name="transform" type="tns:Transformation"/>
+					       </choice>
+					   </complexType>
+					</element>
 				</sequence>
 			</extension>
 		</complexContent>
@@ -118,24 +99,24 @@
 	</complexType>
 
 	<complexType name="BindingVariable">
-		<complexContent>
-			<extension base="tns:MethodBinding">
-				<attribute name="name" type="string" />
-			</extension>
-		</complexContent>
+		<choice>
+			<element name="bind" type="tns:MethodBinding" />
+			<element name="transform" type="tns:Transformation" />
+		</choice>
+		<attribute name="name" type="tns:IdentifierName" use="required" />
 	</complexType>
 
 
-	<complexType name="transformation">
-		<attribute name="class" type="string" />
+	<complexType name="Transformation">
+	   <sequence>
+	       <element name="target" type="tns:MethodBinding" minOccurs="0"/>
+	       <element name="transform" type="tns:Transformation" minOccurs="0"/>
+	   </sequence>
+		<attribute name="class" type="tns:ClassName" use="required" />
 	</complexType>
 
 	<complexType name="ResourceLocator">
-		<sequence>
-			<element name="var" type="tns:BindingVariable" minOccurs="0"
-				maxOccurs="unbounded" />
-			<element name="template" type="string" />
-		</sequence>
+		<attribute name="locator" type="string" use="required" />
 	</complexType>
 
 	<simpleType name="RedirectCodes">
@@ -149,15 +130,10 @@
 	<complexType name="RedirectResponse">
 		<complexContent>
 			<extension base="tns:AbstractResult">
-				<choice>
-					<element name="locator" type="tns:ResourceLocator" />
-					<element name="locatorRef">
-						<complexType>
-							<attribute name="ref" type="string" />
-						</complexType>
-					</element>
+				<sequence>
+					<element name="location" type="tns:ResourceLocator" />
 					<element name="status" type="tns:RedirectCodes" minOccurs="0" />
-				</choice>
+				</sequence>
 			</extension>
 		</complexContent>
 	</complexType>
@@ -168,4 +144,10 @@
 		</restriction>
 	</simpleType>
 
+	<simpleType name="IdentifierName">
+		<restriction base="string">
+			<pattern value="\w+" />
+		</restriction>
+	</simpleType>
+
 </schema>
\ No newline at end of file