<!-- XML DTD for SHOE -->
<!-- Last Mod: 04/28/2000 -->

<!-- Unlike the SHOE SGML DTD, the XML version does not include the
     HTML DTD. To include XML compliant SHOE and HTML in the same
     document, follow the guidelines for using different namespaces 
     expressed in the W3C's "Namespaces in XML" Recommendation. -->
<!-- All element names were changed to lower case to be consistent
     with the definition of XHTML. -->

<!ELEMENT shoe          (ontology | instance)* >

<!-- Since this may be embeded in a document that doesn't have META
     elements, the SHOE version number is included as an attribute
     of the shoe element. -->
<!ATTLIST shoe
        version         CDATA   #REQUIRED >

<!-- Declarations for ontologies -->
<!ELEMENT ontology	(use-ontology | def-category | def-relation | 
                         def-rename | def-inference | def-constant |
			 def-type)* >

<!ATTLIST ontology
	id		CDATA	#REQUIRED
	version		CDATA	#REQUIRED
	description	CDATA	#IMPLIED 
	declarators	CDATA	#IMPLIED
	backward-compatible-with	CDATA	#IMPLIED >

<!ELEMENT use-ontology	 EMPTY >
<!ATTLIST use-ontology
	id		CDATA	#REQUIRED
	version		CDATA	#REQUIRED
	prefix		CDATA	#REQUIRED
	url		CDATA	#IMPLIED >

<!ELEMENT def-category	 EMPTY >
<!ATTLIST def-category
	name		CDATA	#REQUIRED
	isa		CDATA	#IMPLIED
	description	CDATA	#IMPLIED
	short		CDATA	#IMPLIED >

<!ELEMENT def-relation	 (def-arg)* >
<!ATTLIST def-relation
	name		CDATA	#REQUIRED
	short		CDATA	#IMPLIED
	description	CDATA	#IMPLIED >

<!ELEMENT def-arg	 EMPTY >
<!ATTLIST def-arg
	pos		CDATA	#REQUIRED
	type		CDATA	#REQUIRED
	short		CDATA	#IMPLIED >
<!-- pos must be either an integer, or one of the strings: FROM or TO -->
	
<!ELEMENT def-rename	 EMPTY >
<!ATTLIST def-rename
	from		CDATA	#REQUIRED
	to		CDATA	#REQUIRED >

<!ELEMENT def-constant	 EMPTY >
<!ATTLIST def-constant
	name		CDATA	#REQUIRED		
	category	CDATA	#IMPLIED >

<!ELEMENT def-type	 EMPTY >
<!ATTLIST def-type
	name		CDATA	#REQUIRED	
	description	CDATA	#IMPLIED
	short		CDATA	#IMPLIED >

<!-- Declarations for inferences -->
<!-- Inferences consist of if and then parts, each of which
     can contain multiple relation and category clauses -->
<!ELEMENT def-inference	 (inf-if, inf-then) >
<!ATTLIST def-inference
	description	CDATA 	#IMPLIED >
<!ELEMENT inf-if	 (category | relation | comparison)+ >
<!ELEMENT inf-then	 (category | relation)+ >
<!ELEMENT comparison	 (arg, arg) >
<!ATTLIST comparison
	op	(equal | notEqual | greaterThan |
		 greaterThanOrEqual | lessThanOrEqual |
		 lessThan)	#REQUIRED >

<!-- Declarations for instances -->
<!ELEMENT instance	 (use-ontology | category | relation | instance)* >
<!ATTLIST instance
	key		CDATA	#REQUIRED
	delegate-to	CDATA	#IMPLIED >

<!ELEMENT category	 EMPTY >
<!ATTLIST category
	name		CDATA	#REQUIRED
	for		CDATA	#IMPLIED
	usage		(VAR | CONST)	"CONST" >
<!-- If VAR is specified for a category that is not within a <def-inference>,
	then it is ignored -->

<!ELEMENT relation       (arg)* >
<!ATTLIST relation
	name		CDATA	#REQUIRED >
<!ELEMENT arg		 EMPTY >
<!ATTLIST arg
	pos		CDATA	#REQUIRED
	value		CDATA	#REQUIRED
	usage		(VAR | CONST)	"CONST" >

<!-- pos must be either an integer, or one of the strings: FROM or TO -->
<!-- If VAR is specified for an arg that is not within a <def-inference>,
	then it is ignored -->

