<?xml version="1.0"?>

<xs:schema 
targetNamespace="http://www.ruleml.org/0.89/xsd"
xmlns="http://www.ruleml.org/0.89/xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
>

<!-- note that elementFormDefault is qualified because of the local declaration of slot -->

	<xs:annotation>
		<xs:documentation xml:lang="en">
			RuleML frames layer module.
			This is the XML Schema frame module for RuleML.
			File: frame_module.xsd
			Version: 0.89
			Last Modification: 2005-05-27

			See http://www.daml.org/services/swsl/report/swsl/#ruleml-frames for more details.
			
			This module declares the following RuleML elements:
			* Set
			* InstanceOf
			* SubclassOf
			* Signature
			* Get
			* SlotProd
			
			The approach is modelled after that used in "Modularization of XHTML in XML Schema"
			WD [http://www.w3.org/TR/xhtml-m12n-schema/], which will soon be integrated with
			"Modularization of XHTML" (REC-xhtml-modularization-20010410)
			[http://www.w3.org/TR/xhtml-modularization/].
		</xs:documentation>
	</xs:annotation>

	<!--
		*** Set ***
		content model: ( (Ind | Data | Skolem | Var | Reify)* )

		Set-valued result as in t[m -> {v1,...,vk}].
	-->
      <xs:attributeGroup name="Set.attlist"/>
	<xs:group name="Set.content">
		<xs:sequence>
			<xs:group ref="arg.content" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="Set.type">
		<xs:group ref="Set.content"/>
		<xs:attributeGroup ref="Set.attlist"/>
	</xs:complexType>
	<xs:element name="Set" type="Set.type"/>

	<!--
		*** InstanceOf ***
		content model: ( (Ind | Data | Skolem | Var | Reify), (Ind | Data | Skolem | Var | Reify) )

		Class membership molecule.
	-->
      <xs:attributeGroup name="InstanceOf.attlist"/>
	<xs:group name="InstanceOf.content">
		<xs:sequence>
			<xs:group ref="arg.content" minOccurs="2" maxOccurs="2"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="InstanceOf.type">
		<xs:group ref="InstanceOf.content"/>
		<xs:attributeGroup ref="InstanceOf.attlist"/>
	</xs:complexType>
	<xs:element name="InstanceOf" type="InstanceOf.type"/>

	<!--
		*** SubclassOf ***
		content model: ( (Ind | Data | Skolem | Var | Reify), (Ind | Data | Skolem | Var | Reify) )

		Subclass molecule.
	-->
      <xs:attributeGroup name="SubclassOf.attlist"/>
	<xs:group name="SubclassOf.content">
		<xs:sequence>
			<xs:group ref="arg.content" minOccurs="2" maxOccurs="2"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="SubclassOf.type">
		<xs:group ref="SubclassOf.content"/>
		<xs:attributeGroup ref="SubclassOf.attlist"/>
	</xs:complexType>
	<xs:element name="SubclassOf" type="SubclassOf.type"/>

	<!--
		*** Signature ***
		content model: ( oid, (op | Con | Data | Skolem | Var | Reify | Hterm)?, slot* )

		Signature molecule.
	-->
      <xs:attributeGroup name="Signature.attlist"/>
	<xs:group name="Signature.content">
		<xs:sequence>
			<xs:element ref="oid"/>
			<xs:choice minOccurs="0">
				<xs:element ref="op"/>				
				<xs:group ref="op.content"/>
			</xs:choice>
			<xs:element name="slot" type="slot-frame.type" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="Signature.type">
		<xs:group ref="Signature.content"/>
		<xs:attributeGroup ref="Signature.attlist"/>
	</xs:complexType>
	<xs:element name="Signature" type="Signature.type"/>

	<!--
		*** Get ***
		content model: ( oid, SlotProd )

		Slot access primitive.
	-->
      <xs:attributeGroup name="Get.attlist"/>
	<xs:group name="Get.content">
		<xs:sequence>
			<xs:element ref="oid"/>
			<xs:element ref="SlotProd"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="Get.type">
		<xs:group ref="Get.content"/>
		<xs:attributeGroup ref="Get.attlist"/>
	</xs:complexType>
	<xs:element name="Get" type="Get.type"/>

	<!--
		*** SlotProd ***
		content model: (Ind | Data | Skolem | Var | Reify)+

		Polyadic path expressions element.
	-->
      <xs:attributeGroup name="SlotProd.attlist"/>
	<xs:group name="SlotProd.content">
		<xs:sequence>
			<xs:group ref="arg.content" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="SlotProd.type">
		<xs:group ref="SlotProd.content"/>
		<xs:attributeGroup ref="SlotProd.attlist"/>
	</xs:complexType>
	<xs:element name="SlotProd" type="SlotProd.type"/>

</xs:schema>