<?xml version="1.0" ?>
<!-- 
Copyright Notice
(c) 2006 Hewlett-Packard Development Company (HP), Intel Corporation,
International Business Machines Corporation (IBM), and Microsoft
Corporation. All rights reserved.

Permission to copy and display the "Web Services Resource Transfer"
Specification, in any medium without fee or royalty is hereby granted,
provided that you include the following on ALL copies of the "Web
Services Resource Transfer" Specification, or portions thereof, that
you make:
 1. A link or URL to the "Web Services Resource Transfer"
    Specification at this location:
       http://schemas.xmlsoap.org/ws/2006/08/resourceTransfer.
 2. The copyright notice as shown in the "Web Services Resource
    Transfer" Specification.

Hewlett-Packard Development Company (HP), Intel Corporation,
International Business Machines Corporation (IBM), and Microsoft
Corporation (collectively, the "Authors") each agree to grant you a
royalty-free license, under reasonable, non-discriminatory terms and
conditions to their respective patents that they deem necessary to
implement the "Web Services Resource Transfer" Specification.

THE "WEB SERVICES RESOURCE TRANSFER" SPECIFICATION IS PROVIDED "AS IS,"
AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
CONTENTS OF THE "WEB SERVICES RESOURCE TRANSFER" SPECIFICATION ARE
SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS
WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.

THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
USE OR DISTRIBUTION OF THE "WEB SERVICES RESOURCE TRANSFER"
SPECIFICATION.

The name and trademarks of the Authors may NOT be used in any manner,
including advertising or publicity pertaining to the "Web Services
Resource Transfer" Specification or its contents without specific,
written prior permission. Title to copyright in the "Web Services
Resource Transfer" Specification will at all times remain with the
Authors.

No other rights are granted by implication, estoppel or otherwise.
--> 

<xs:schema
	targetNamespace="http://schemas.xmlsoap.org/ws/2006/08/resourceTransfer"
	xmlns:wsrt="http://schemas.xmlsoap.org/ws/2006/08/resourceTransfer"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:wsmex="http://schemas.xmlsoap.org/ws/2004/09/mex"
	elementFormDefault="qualified" blockDefault="#all">

	<xs:import
		namespace="http://www.w3.org/2005/08/addressing"
        schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd" />
	<xs:import
		namespace="http://schemas.xmlsoap.org/ws/2004/09/mex"
		schemaLocation="http://schemas.xmlsoap.org/ws/2004/09/mex/MetadataExchange.xsd" />

 
	<!-- ResourceMetadata section -->

      <!-- A wsmex:MetadaSection with a wsmex:Dialect of http://schemas.xmlsoap.org/ws/2006/08/resourceTransfer
           contains the following Metadata element
      -->
	<xs:element name="Metadata">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="wsrt:Lifetime" minOccurs="0" />
				<xs:element ref="wsrt:SupportedDialect" minOccurs="0" maxOccurs="unbounded" />
     			<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>



	<xs:element name="Lifetime">
		<xs:complexType>
			<xs:sequence>
				<xs:choice>
					<xs:element ref="wsrt:TerminateAt" />
					<xs:element name="TerminateAfter" type="xs:duration" />
					<xs:element name="TerminateAfterIdle" type="xs:duration" />
				</xs:choice>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="TerminateAt">
       <xs:complexType>
         <xs:sequence>
			<xs:element name="TerminationTime" type="xs:dateTime"/>
			<xs:element name="CurrentTime" type="xs:dateTime" />
         </xs:sequence>
       </xs:complexType>
    </xs:element>

	<xs:element name="SupportedDialect">
		<xs:complexType>
            <xs:sequence>
				<xs:element ref="wsrt:SupportedOperation" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
			<xs:attribute name='DialectName' type='xs:anyURI' use='required' />
        </xs:complexType>
    </xs:element>

	<xs:element name="SupportedOperation">
		<xs:complexType>
            <xs:sequence>
				<xs:element name="SupportedPutMode" type="wsrt:ModeType" minOccurs="0" maxOccurs="unbounded" />
				<xs:element name="MultipartLimit" type="xs:positiveInteger" minOccurs="0" />
            </xs:sequence>
			<xs:attribute name='OperationName' type='xs:anyURI' use='required' />
        </xs:complexType>
    </xs:element>


	<!-- Shared Types section -->
	<xs:complexType name='MixedAnyType' final='restriction'
		mixed="true">
		<xs:complexContent mixed="true">
			<xs:restriction base="xs:anyType">
				<xs:sequence>
					<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name='ResultType' final='restriction'>
		<xs:complexContent>
			<xs:extension base='wsrt:MixedAnyType'/>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name='ExpressionType' final='restriction'>
		<xs:complexContent>
			<xs:extension base='wsrt:MixedAnyType'/>
		</xs:complexContent>
	</xs:complexType>
    <xs:element name='Expression' type='wsrt:ExpressionType'/>

	<xs:complexType name='FragmentType'>
		<xs:sequence>
			<xs:element ref='wsrt:Expression' minOccurs='0' maxOccurs='1' />
			<xs:element name='Value' type='wsrt:MixedAnyType' minOccurs='0' maxOccurs='1' />
		</xs:sequence>
	</xs:complexType>
    <xs:element name='Fragment' type='wsrt:FragmentType'/>

	<xs:element name="ResourceTransfer">
       <xs:complexType>
         <xs:anyAttribute namespace="##other" processContents="lax"/>
       </xs:complexType>
    </xs:element>


	<!-- Create section -->

	<xs:element name='Create'>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref='wsmex:Metadata' minOccurs='0' />
				<xs:element ref='wsrt:Fragment' minOccurs='0' maxOccurs='unbounded' />
			</xs:sequence>
			<xs:attribute name='Dialect' type='xs:anyURI' />
		</xs:complexType>
	</xs:element>

	<xs:element name="CreateResponse">
	  <xs:complexType>
		<xs:sequence>
			<xs:element ref="wsrt:ResourceCreated" />
		</xs:sequence>
	  </xs:complexType>
    </xs:element>
 
	<xs:element name="ResourceCreated" type="wsa:EndpointReferenceType" />

	<!-- Put section -->

	<xs:element name='Put'>
		<xs:complexType>
			<xs:sequence>
				<xs:element name='Fragment' type='wsrt:PutFragmentType'
					                             maxOccurs='unbounded' />
			</xs:sequence>
			<xs:attribute name='Dialect' type='xs:anyURI' />
		</xs:complexType>
	</xs:element>

	<xs:complexType name='PutFragmentType'>
		<xs:complexContent>
			<xs:extension base="wsrt:FragmentType">
				<xs:attribute name='Mode' type='wsrt:ModeType' use='required' />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>


	<xs:simpleType name="ModeType" final="restriction">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Modify" />
			<xs:enumeration value="Insert" />
			<xs:enumeration value="Remove" />
		</xs:restriction>
	</xs:simpleType>

	<xs:element name="PutResponse">
       <xs:complexType/>
    </xs:element>


	<!-- Get section -->

	<xs:element name='Get'>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref='wsrt:Expression'
					minOccurs='0' maxOccurs='unbounded' />
			</xs:sequence>
			<xs:attribute name='Dialect' type='xs:anyURI' />
		</xs:complexType>
	</xs:element>

	<xs:element name='GetResponse'>
		<xs:complexType>
			<xs:sequence>
				<xs:element name='Result' type='wsrt:ResultType'
					maxOccurs='unbounded'/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<!-- Fault section -->

    <xs:simpleType name="FaultCodeTypes">
      <xs:restriction base="xs:QName">
        <xs:enumeration value="wsrt:ConcurrencyFault" />
        <xs:enumeration value="wsrt:UnsupportedDialectFault" />
        <xs:enumeration value="wsrt:InvalidExpressionFault" />
        <xs:enumeration value="wsrt:GetFault" />
        <xs:enumeration value="wsrt:ResourceValidityFault" />
        <xs:enumeration value="wsrt:FragmentAlreadyExistsFault" />
        <xs:enumeration value="wsrt:PutFault" />
        <xs:enumeration value="wsrt:PutModeUnsupportedFault" />
        <xs:enumeration value="wsrt:CreateFault" />
        <xs:enumeration value="wsrt:InvalidMetadataFault" />
        <xs:enumeration value="wsrt:MultipartLimitExceededFault" />
        <xs:enumeration value="wsrt:InvalidPutSyntaxFault" />
      </xs:restriction>
    </xs:simpleType>

	<xs:element name='Dialect' type='xs:anyURI'/>

	<xs:element name='InvalidExpressionSyntax'>
      <xs:complexType>
		<xs:sequence>
			<xs:element ref='wsrt:Expression' minOccurs='1' maxOccurs='unbounded' />
        </xs:sequence>
      </xs:complexType>
    </xs:element>

	<xs:element name='InvalidExpressionValue'>
      <xs:complexType>
		<xs:sequence>
			<xs:element ref='wsrt:Expression' minOccurs='1' maxOccurs='unbounded' />
        </xs:sequence>
      </xs:complexType>
    </xs:element>

	<xs:element name='MultipartLimit' type='xs:positiveInteger'/>

	<xs:element name='SideEffects' type='xs:boolean'/>

	<!-- XPath section -->

	<xs:element name='AttributeNode'>
       <xs:complexType>
		 <xs:simpleContent>
			<xs:extension base='xs:string'>
               <xs:attribute name='name' type='xs:QName'/>
            </xs:extension>
		 </xs:simpleContent>
       </xs:complexType>
    </xs:element>


    <xs:element name='TextNode' type='xs:string'/>

    <xs:element name='NodeSet' type='wsrt:ResultType'/>

</xs:schema>
