SWRL RuleML
Accessing SWRL Properties as "Foreign" Atoms

David Hirtle, Harold Boley, Mike Dean

Schemas: XSD Directory

Examples: Examples Directory

2004-08-12: Version 0.6


A proposal for a Semantic Web Rule Language (SWRL) combining OWL and RuleML has been submitted to the W3C. This document discusses changes to RuleML which permit access to SWRL properties as "foreign" atoms.

Contents

Overview

SWRL is a Semantic Web Rule Language based on a combination of the OWL DL and OWL Lite sublanguages of the OWL Web Ontology Language with the Unary/Binary Datalog RuleML sublanguages of the RuleML. It thus extends the set of OWL axioms to include Horn-like rules and enables Horn-like rules to be combined with an OWL knowledge base. For more information, consult the actual SWRL proposal to the W3C.

RuleML is now extended to permit access to SWRL properties as so-called "foreign" atoms. This is initially applied to the (Unary) Datalog sublanguage resulting in a new sublanguage called SWRL-Datalog. Both a monolithic and a modular version have been implemented (swrldatalog_monolith.xsd and swrldatag.xsd, respectively).

Monolithic SWRL-Datalog

The implementation of the monolithic version of the SWRL-Datalog sublanguage only differs from the regular Datalog in a few ways:

Monolithic Example Validation

Validating Monolithic SWRL Datalog XSD using Example 5.1-4 from proposal
========================================================================

1. Direct your browser to 
http://www.w3.org/2001/03/webdata/xsv
(Validator for XML Schema REC 20010502 version).

2. Enter the following URL of our example RuleML file (or any other) into the textfield
preceded by "Address(es)": http://www.ruleml.org/swrl/exa/example5.1-4.swrlx

3. If desired, check the "Show Warnings" box.

4. Click the "Get Results" button.

Note: The validation may take a while, and may require a full
refresh when re-validating to avoid caching.

Also note: Depending on your browser, you may want to select a different
output using the radio buttons just above the "Get Results" button.			
				
***

You should get the following output (using the default):

Schema validating with XSV 2.7-1 of 2004/04/01 13:40:50

  • Target: http://www.ruleml.org/swrl/exa/example5.1-4.swrlx
       (Real name: http://www.ruleml.org/swrl/exa/example5.1-4.swrlx
        Length: 8877 bytes
        Last Modified: Mon, 12 Jul 2004 15:22:49 GMT
        Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_fastcgi/2.4.2 mod_ssl/2.8.12 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 mod_perl/1.26)
  • docElt: {http://www.w3.org/2003/11/swrlx}Ontology
  • Validation was strict, starting with type [Anonymous]
  • schemaLocs: http://www.w3.org/2003/11/swrlx -> http://www.ruleml.org/swrl/xsd/swrlx.xsd
  • The schema(s) used for schema-validation had no errors
  • No schema-validity problems were found in the target

Schema resources involved

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/swrlx.xsd (source: schemaLoc) for http://www.w3.org/2003/11/swrlx, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl.xsd (source: import) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-lite-core.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/xml.xsd (source: import) for http://www.w3.org/XML/1998/namespace, skipped, other docs already loaded for this namespace:

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl-classElementGroup.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl-descriptionGroup.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl-restrictionGroup.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl-domainRangeGroup.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-lite-dataPropInverseFuncAttr.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/owl1-dl-objectPropInverseFuncAttr.xsd (source: include) for http://www.w3.org/2003/05/owl-xml, succeeded

Attempt to load a schema document from http://www.ruleml.org/swrl/xsd/swrldatalog_monolith.xsd (source: import) for http://www.w3.org/2003/11/ruleml, succeeded

Attempt to load a schema document from http://www.daml.org/rules/proposal/swrlx.xsd (source: import) for http://www.w3.org/2003/11/swrlx, skipped, other docs already loaded for this namespace:

Attempt to load a schema document from http://www.daml.org/rules/proposal/owlx/schema/owl1-dl.xsd (source: import) for http://www.w3.org/2003/05/owl-xml, skipped, other docs already loaded for this namespace: http://www.ruleml.org/swrl/xsd/owl1-lite-core.xsd http://www.ruleml.org/swrl/xsd/owl1-dl-classElementGroup.xsd http://www.ruleml.org/swrl/xsd/owl1-dl-descriptionGroup.xsd http://www.ruleml.org/swrl/xsd/owl1-dl-restrictionGroup.xsd http://www.ruleml.org/swrl/xsd/owl1-dl-domainRangeGroup.xsd http://www.ruleml.org/swrl/xsd/owl1-lite-dataPropInverseFuncAttr.xsd http://www.ruleml.org/swrl/xsd/owl1-dl-objectPropInverseFuncAttr.xsd http://www.ruleml.org/swrl/xsd/owl1-dl.xsd


Modular SWRL-Datalog

The implementation of the modular version of the SWRL-Datalog sublanguage involves the same extensions as the monolithic version but is fundamentally different.

Modular SWRL-Datalog uses the new model emerging from the evaluation of alternative modularizations of RuleML. Using the new model's UML-like representation, SWRL-Datalog looks as follows:

Model of the modularization of SWRL-Datalog

Instead of defining all elements of RuleML itself (as is the case with the monolithic version), swrldatalog.xsd uses aggregation to "inherit" everything from datalog.xsd making modifications as necessary (using xs:redefine). For example, atoms from SWRL are added to _head like so:

<xs:redefine schemaLocation="datalog.xsd">
  ...
  <!-- _head's content model becomes: ( ruleml:atom | (swrlx:atom)* ) -->
  <xs:group name="_head.content">
    <xs:choice>
      <xs:group ref="ruleml:_head.content"/>
      <xs:group ref="swrlx:atom" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:group>
  ...
<xs:redefine>


Site Contact: Harold Boley. Page Version: 2004-08-12


"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)