view _test/Resources/resources.xsd @ 220:5c82c15b25b1

sync, updated schema
author sergey
date Thu, 23 Aug 2012 17:44:31 +0400
parents c477f24f1980
children e997e6fbac0b
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://implab.org/schemas/resources" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://implab.org/schemas/resources">
    <element name="resources">
    	<complexType>
    		<sequence>
    			<element name="root" type="tns:restResource"></element>
    			<element name="typeMap" minOccurs="0">
    				<complexType>
    					<sequence>
    						<element name="item" maxOccurs="unbounded">
    							<complexType>
    								<complexContent>
    									<extension
    										base="tns:restResource">
    										<sequence></sequence>
    										<attribute
    											name="type" type="string">
    										</attribute>
    									</extension>
    								</complexContent>
    							</complexType></element>
    					</sequence>
    				</complexType>
    			</element>
    		</sequence>
    	</complexType>
    </element>
    
    <!-- abstract types  -->
    <complexType name="abstractBinding" abstract="true"/>
    <complexType name="abstractTransformation" abstract="true" />
    <complexType name="abstractResult" abstract="true" />
    
    <complexType name="restResource">
        <sequence>
    		<element name="get" type="tns:restOperation" minOccurs="0"/>
    		<element name="post" type="tns:restOperation" minOccurs="0"/>
    		<element name="put" type="tns:restOperation" minOccurs="0"/>
    		<element name="delete" type="tns:restOperation" minOccurs="0"/>
    		<element name="resource" type="string" maxOccurs="unbounded" minOccurs="0"/>
    	</sequence>
    </complexType>
    
    <complexType name="restOperation">
    	<sequence>
    		<element name="bind" type="tns:methodBinding"/>
    		<element name="parameters" type="tns:transformation" minOccurs="0"/>
    		<element name="result" type="tns:abstractResult" minOccurs="0"/>
    	</sequence>
    </complexType>
    
    <complexType name="methodBinding" >
        <sequence>
            <element name="var" type="tns:bindingVariable" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="text" type="string" use="required" />
    </complexType>
    
    <complexType name="bindingVariable">
        <complexContent>
            <extension base="tns:methodBinding">
                <attribute name="name" type="string"/>
            </extension>
        </complexContent>
    </complexType>
    
    
    <complexType name="transformation">
        <attribute name="class" type="string" />
    </complexType>
    
    <complexType name="resourceLocator">
        <sequence>
            <element name="var" type="tns:bindingVariable" minOccurs="0" maxOccurs="unbounded"/>
            <element name="template" type="string" />
        </sequence>
    </complexType>
    
    <simpleType name="redirectCodes">
        <restriction base="string">
            <enumeration value="moved-permanently"/>
            <enumeration value="temporary-redirect"/>
            <enumeration value="see-other"/>
        </restriction>
    </simpleType>
    
    <complexType name="redirectResult">
        <complexContent>
            <extension base="tns:abstractResult">
                <sequence>
                    <element name="locator" type="tns:resourceLocator" />
                    <element name="status" type="tns:redirectCodes" minOccurs="0"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

</schema>