Mercurial > pub > Impl
diff _test/Resources/resources.xsd @ 226:b6cde007a175
Added resource contract
author | sergey |
---|---|
date | Wed, 05 Sep 2012 15:10:26 +0400 |
parents | e6c050db7d98 |
children |
line wrap: on
line diff
--- a/_test/Resources/resources.xsd Fri Aug 31 16:41:18 2012 +0400 +++ b/_test/Resources/resources.xsd Wed Sep 05 15:10:26 2012 +0400 @@ -14,7 +14,7 @@ <complexContent> <extension base="tns:ResourceContract"> <attribute name="id" type="string" /> - <attribute name="modelType" type="tns:ClassName"/> + <attribute name="modelType" type="tns:ClassName" /> </extension> </complexContent> </complexType> @@ -43,9 +43,18 @@ <sequence> <choice> <element name="name" type="string" /> - <element name="match" type="string" /> + <element name="match"> + <complexType> + <simpleContent> + <extension base="string"> + <attribute name="vars" type="tns:VarList"/> + </extension> + </simpleContent> + </complexType> + + </element> </choice> - <element name="model" minOccurs="0" type="tns:MethodBinding" /> + <group ref="tns:BindingExpressions"/> <choice> <element name="contract"> <complexType> @@ -71,25 +80,32 @@ minOccurs="0" /> </sequence> </group> + + <group name="BindingExpressions"> + <choice> + <element name="bind" type="tns:Binding"/> + <element name="transform" type="tns:Transformation"/> + <element name="value" type="string" /> + </choice> + </group> <complexType name="OperationContract"> - <complexContent> - <extension base="tns:MethodBinding"> - <sequence> - <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> + + <sequence> + <element name="bind" type="tns:Binding" /> + <element name="response" minOccurs="0"> + <complexType> + <choice> + <element name="redirect" type="tns:RedirectResponse" /> + <element name="transform" type="tns:Transformation" /> + </choice> + </complexType> + </element> + </sequence> + </complexType> - <complexType name="MethodBinding"> + <complexType name="Binding"> <sequence> <element name="var" type="tns:BindingVariable" minOccurs="0" maxOccurs="unbounded" /> @@ -100,18 +116,20 @@ <complexType name="BindingVariable"> <choice> - <element name="bind" type="tns:MethodBinding" /> + <element name="bind" type="tns:Binding" /> <element name="transform" type="tns:Transformation" /> + <element name="value" type="string" /> </choice> <attribute name="name" type="tns:IdentifierName" use="required" /> </complexType> <complexType name="Transformation"> - <sequence> - <element name="target" type="tns:MethodBinding" minOccurs="0"/> - <element name="transform" type="tns:Transformation" minOccurs="0"/> - </sequence> + <sequence> + <element name="target" type="tns:Binding" minOccurs="0" /> + <element name="transform" type="tns:Transformation" + minOccurs="0" /> + </sequence> <attribute name="class" type="tns:ClassName" use="required" /> </complexType> @@ -149,5 +167,11 @@ <pattern value="\w+" /> </restriction> </simpleType> + + <simpleType name="VarList"> + <restriction base="string"> + <pattern value="(\w+)(\s*,\s*(\w+))*" /> + </restriction> + </simpleType> </schema> \ No newline at end of file