]]>This is a preliminary DTD draft for RuleML. Each DTD in the evolving hierarchy corresponds to a specific RuleML sublanguage. The DTDs use a modularization approach similar to the one in XHTML in order to offer appropriate flexibility and accomodate different implementations and approaches. We will write a technical report on this system of RuleML DTDs (see also KR Principles and DTD Modularization).
The upper layer of the RuleML hierarchy of rules is discussed in our main page's design section. In that terminology, the system of RuleML DTDs presented here only covers state-preserving rules (declarative, deductive-rewriting rules), not state-changing rules (active, trigger rules); special tags for facts are also omitted.
This is because we think it is important to start with a subset of simple rules, test and refine our principal strategy using these, and then work 'up' to the more general categories of rules in the hierarchy. For this we choose Datalog, a language corresponding to relational databases (ground facts without complex domains or 'constructors') augmented by views (possibly recursive rules), and work a few steps upwards to further declarative rules from (equational) Horn logic. We also work upwards from a URL/URI language corresponding to simple objects. The join of both of these branches then permits inferences over RDF-like 'resources' and can be re-specialized to RDF triples.
Regarding the concrete markup syntax, we have been experimenting
with several DTDs prior to the current, still preliminary, version.
The rationale for our current tags is as follows.
Appended below is a preliminary DTD, designated version 0.7, for the Datalog subset of RuleML (Appendix 1). Also appended below is a simple example rulebase that conforms to that DTD, and instructions for how to validate the example against the DTD.
There now also is a family of DTD's, specified in a modular fashion (using parameter ENTITY declarations), also designated vers. 0.7, at this URL: http://www.ruleml.org/0.7/dtd/ . Note that this family of DTD's is, overall, more raw/immature than just the Datalog member of that family. Note that the Datalog DTD on the website is a bit more complex, but equivalent, to the one appended below. The one below is called "stand-alone", because it has stripped out most of the ENTITY declarations that are in the website (non-"stand-alone") version.
To see the DTD's on the website: After you clicked on the *.dtd files, you may have to select View | Page Source. Thus, we provide additional *.dtd.txt links. Downloading should work anyway.
You can try things out "stand-alone", as explained in Appendix 3, using the own.ruleml example of Appendix 2 (Warnings here concern only stylistic matters).
You may also use the non-"stand-alone" modules to study XML's "INCLUDE"/"IGNORE" overriding method for DTDs that are read in via "ENTITY % ... SYSTEM *.dtd" declarations. But you can get the gist of the definitions also when treating most of these house-keeping directives as no-ops.
After some discussions, we found a set of tag names that sound reasonable to us. Feedback is very welcome.
Facts are currently simply rules ("if" elements) that have empty (i.e. 'true') 'and' prems. We'll need an explicit, abbreviating tag. Similarly, perhaps, for trigger rules and integrity constraints.
User comments on all levels are already taken care of by XML; look at the sample datalog document own.ruleml.
More sample files -- each referring to the most specific DTD still validating them -- can be found at: http://www.ruleml.org/0.7/exa/ . See the instructions above (about View | Page Source, etc.) for viewing the content etc.
]]>
own
person
object
buy
person
merchant
object
keep
person
object
buy
person
merchant
object
sell
merchant
person
object
sell
John
Mary
XMLBible
keep
Mary
XMLBible
]]> Go to]]>
http://www.stg.brown.edu/service/xmlvalid/
Paste in at
URI:
http://www.ruleml.org/0.7/exa/own.ruleml
> Hit the 'Validate' button
> You should get:
Validation Results for http://www.ruleml.org/0.7/exa/own.ruleml
Warnings:
line 31, http://www.ruleml.org/0.7/dtd/ruleml-datalog-standalone.dtd:
warning (652): element has more than one attlist declaration: rulebase
line 73, http://www.ruleml.org/0.7/exa/own.ruleml:
warning (1106): empty-tag syntax used for element not declared with EMPTY content model: and
line 92, http://www.ruleml.org/0.7/exa/own.ruleml:
warning (1106): empty-tag syntax used for element not declared with EMPTY content model: and
Document validates OK.]]>
Site Contact:
Harold Boley.
Page Version: 2001-02-14
"Practice what you preach": XML source of this homepage at index.xml (index.xml.txt);
transformed to HTML via the adaptation of Michael Sintek's SliML XSLT stylesheet at homepage.xsl (View | Page Source)