<?xml version="1.0"?>

<!-- XML Schema for Slide APIs  -->

<!-- schema xmlns="http://www.w3.org/TR/1999/09/24-xmlschema" -->
<schema targetNamespace="opendav.exolab.org/schema">
	
	<element name="domain">
		<type>
			<element ref="namespace-def" minOccurs="1"/>
		</type>
	</element>
	
	<element name="namespace-def">
		<type>
			<element name="access" type="string" minOccurs="0"/>
			<attribute name="initfile" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="namespace">
		<type>
			<element ref="descriptorsstore" minOccurs="1"/>
			<element ref="contentstore" minOccurs="1"/>
			<element ref="scope" minOccurs="1"/>
			<element name="basedata" type="string" minOccurs="0" maxOccurs="1"/>
			<element ref="config" minOccurs="1" maxOccurs="1"/>
			<attribute name="name" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="descriptorsstore">
		<type>
			<element ref="parameter" minOccurs="0"/>
			<attribute name="name" type="string" minOccurs="1"/>
			<attribute name="classname" type="string" minOccurs="1"/>
                        <attribute name="type" type="string" minOccurs="0"/>
		</type>
	</element>
	
	<element name="contentstore">
		<type>
			<element ref="parameter" minOccurs="0"/>
			<attribute name="name" type="string" minOccurs="1"/>
			<attribute name="classname" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="parameter">
		<type content="textOnly">
			<attribute name="name" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="scope">
		<type>
			<element ref="scope" minOccurs="0"/>
                        <attribute name="type" type="int" minOccurs="0"/>
			<attribute name="match" type="string" minOccurs="1"/>
			<attribute name="descriptorsstore" type="string" minOccurs="0"/>
			<attribute name="contentstore" type="string" minOccurs="0"/>
		</type>
	</element>
	
	<element name="config">
		<type>
			<element name="default-action" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="read-object" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="create-object" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="remove-object" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="grant-permission" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="revoke-permission" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="read-permissions" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="lock-object" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="kill-lock" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="read-locks" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="read-revision-metadata" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="create-revision-metadata" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="modify-revision-metadata" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="remove-revision-metadata" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="read-revision-content" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="create-revision-content" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="modify-revision-content" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="remove-revision-content" type="string" minOccurs="0" maxOccurs="1"/>
			<element name="userspath" type="string" minOccurs="1" maxOccurs="1"/>
			<element name="filespath" type="string" minOccurs="1" maxOccurs="1"/>
                        <element ref="parameter" minOccurs="0"/>
		</type>
	</element>
	
        <!-- Used by the XML (un)marshaller -->
        
	<element name="objectnode">
		<type>
			<element ref="permission" minOccurs="0"/>
			<element ref="objectnode" minOccurs="0"/>
			<element name="target" type="string" minOccurs="0" maxOccurs="1"/>
			<attribute name="uri" type="string" minOccurs="1"/>
			<attribute name="classname" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="permission">
		<type>
			<attribute name="subject" type="string" minOccurs="1"/>
			<attribute name="action" type="string" minOccurs="1"/>
                        <attribute name="inheritance" type="string" minOccurs="0"/>
		</type>
	</element>
	
	<element name="revisiondescrs">
		<type>
                        <element ref="latestrevision" minOccurs="1"/>
                        <element ref="relation" minOccurs="0"/>
                        <attribute name="isversioned" type="string" minOccurs="0"/>
                        <attribute name="initialrevision" type="string" minOccurs="0"/>
		</type>
	</element>
        
        <element name="latestrevision">
                <type>
                        <attribute name="branch" type="string" minOccurs="1"/>
                        <attribute name="number" type="string" minOccurs="1"/>
                </type>
        </element>
        
        <element name="relation">
                <type>
                        <element ref="revisiondescr" minOccurs="1" maxOccurs="1"/>
                        <element ref="successor" minOccurs="0"/>
                </type>
        </element>
        
        <element name="successor">
                <type>
                        <attribute name="number" type="string" minOccurs="1"/>
                </type>
        </element>
        
        <element name="revisiondescr">
                <type>
                        <element name="content" type="string" minOccurs="0" maxOccurs="1"/>
                        <element name="label" type="string" minOccurs="0"/>
                        <element ref="property" minOccurs="0"/>
                        <attribute name="number" type="string" minOccurs="1"/>
                        <attribute name="branch" type="string" minOccurs="1"/>
                </type>
        </element>
        
        <element name="property">
                <type content="textOnly">
                        <attribute name="name" type="string" minOccurs="1"/>
                        <attribute name="definition" type="string" minOccurs="1"/>
                        <attribute name="definitionname" type="string" minOccurs="1"/>
                        <attribute name="protected" type="string" minOccurs="0"/>
                </type>
        </element>
	
	<!--element name="module">
		<type>
			<element name="domain-def" type="string" minOccurs="1" maxOccurs="1"/>
			<element ref="actions" minOccurs="0" maxOccurs="1"/>
			<element ref="files" minOccurs="0" maxOccurs="1"/>
			<element ref="users" minOccurs="0" maxOccurs="1"/>
			<attribute name="namespace" type="string" minOccurs="1"/>
			<attribute name="name" type="string" minOccurs="1"/>
		</type>
	</element>
	
	<element name="actions">
		<type>
			<element ref="path" minOccurs="0"/>
		</type>
	</element>
	
	<element name="files">
		<type>
			<element ref="path" minOccurs="0"/>
		</type>
	</element>
	
	<element name="users">
		<type>
			<element ref="path" minOccurs="0"/>
		</type>
	</element>
	
	<element name="path">
		<type>
			<attribute name="name" type="string" minOccurs="1"/>
			<attribute name="uri" type="string" minOccurs="1"/>
		</type>
	</element-->
	
</schema>