<?xml version="1.0"?>

<xs:schema 
targetNamespace="http://www.ruleml.org/0.87/xsd"
xmlns="http://www.ruleml.org/0.87/xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>

	<xs:annotation>
		<xs:documentation xml:lang="en">
			Clause RuleML elements module.
			This is the XML Schema clause elements module for RuleML.
			File: clause_module.xsd
			Version: 0.87
			Last Modification: 2004-07-23
			
			This module declares the following clause RuleML elements:
			* head
			* body
			
			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>

	<!--
		*** head ***
		content model: (Atom)
		
		The head of a rule, also known as the "consequent" or "then" part of the rule.

		The head role is usable within facts (where it's optional) and implication rules.  It
		uses an atomic (or, in equalog, equational) formula.
	-->
	<xs:attributeGroup name="head.attlist"/>
	<xs:group name="head.content">
		<xs:choice>
			<xs:element ref="Atom"/>
		</xs:choice>
	</xs:group>
	<xs:complexType name="head.type">
		<xs:group ref="head.content"/>
		<xs:attributeGroup ref="head.attlist"/>
	</xs:complexType>
	<xs:element name="head" type="head.type"/>

	<!-- 
		*** body ***
		content model: (Atom | And | Or)
	
		The body of a rule, also known as the "antecedent" or "if" part of the rule.

		The body role is usable within query tests (where it's optional) and implication rules.
		It uses an atomic (or, in equalog, equational) formula, an 'And' or an 'Or'.
	-->
	<xs:attributeGroup name="body.attlist"/>
	<xs:group name="body.content">
		<xs:choice>
			<xs:element ref="Atom"/>
			<xs:element ref="And"/>
			<xs:element ref="Or"/>
		</xs:choice>
	</xs:group>
	<xs:complexType name="body.type">
		<xs:group ref="body.content"/>
		<xs:attributeGroup ref="body.attlist"/>
	</xs:complexType>
	<xs:element name="body" type="body.type"/>

</xs:schema>
