RE: ISSUE 5.6 - daml:imports as magic syntax

Here is what I think is a simple suggestion for an essentially
syntactic treatment of owl:imports using XML:Base.

I wrote this note and then finally followed Jonathan's pointer to
XInclude, which seems like a decent option, except for the requirement
that a loop be a fatal error.  In distributed ontologies I would
expect loops to show up.  ???

As I understand our current draft status, the structure of an OWL
ontology with an imports clause is,

<rdf:rdf 
    xmlns     ="#" 
    ... plus other namespace declarations >
 <owl:ontology about="">
  ...
  <owl:imports rdf:resource="http://www.w3.org/foo.owl" />
  ...
 </owl:ontology>
</rdf:rdf>

(No comment on how odd the RDF:RDF wrapper around all OWL ontologies
seems.)

If we consider textually replacing the imports clause with the text of
the referenced ontology we would get something like:

<rdf:rdf 
    xmlns     ="#" >
 <owl:ontology about="">
  ...
  <rdf:rdf 
      xmlns     ="#" >
   <owl:ontology about="">
    ...
   </owl:ontology>
  </rdf:rdf>
  ...
 </owl:ontology>
</rdf:rdf>

Which has obvious problems, in both the imbedded namespace declaration
and the imbedded 'about' attribute.

It would seem that we could solve this using XML:BASE.  Suppose the
expansion augmented the imported ontology with a base expression that
referenced the imported document.

<rdf:rdf 
    xmlns     ="#" >
 <owl:ontology about="">
  ...
  <rdf:rdf 
      xml:base= "http://www.w3.org/foo.owl"   
      xmlns     ="#" >
   <owl:ontology about="">
    ...
   </owl:ontology>
  </rdf:rdf>
  ...
 </owl:ontology>
</rdf:rdf>

This should actually work for the namespace component, since the scope
of the xml:base occurence starts with the rdf:rdf element, and will
extend until a new base is established or we exit the scope of the
rdf:rdf tag. (See http://www.w3.org/TR/xmlbase/)

So, the remaining problem is the imbedded 'about' attribute.  Since we
get to define what this attribute means, I would think we could define it
relative to the current base URI.  

Note that this works in the case of multiple, imbedded imports.  

- Mike

Michael K. Smith, Ph.D., P.E.
EDS - Austin Innovation Centre
98 San Jacinto, #500
Austin, TX  78701

* phone: +01-512-404-6683
* mailto:michael.smith@eds.com


-----Original Message-----
From: Dan Connolly [mailto:connolly@w3.org]
Sent: Tuesday, September 10, 2002 11:28 AM
To: Jonathan Borden
Cc: Jeff Heflin; Peter F. "Patel-Schneider; www-webont-wg@w3.org
Subject: Re: ISSUE 5.6 - daml:imports as magic syntax



On Mon, 2002-09-09 at 19:40, Jonathan Borden wrote:
> 
> Peter F. Patel-Schneider wrote:
> >
> > A treatment of imports can be done completely syntactically, by
replacing
> > imports foo, where foo is a URI (or whatever) by the contents of the
> > document pointed at by foo.   This is the way I would handle it in the
> > abstract syntax and direct semantics.
> 
> hmmm... if we consider that daml:imports is syntactic sugar for XInclude
> http://www.w3.org/TR/xinclude/ i.e.
> 
> <xi:include
>     xmlns:xi="http://www.w3.org/2001/XInclude"
>     href="foo.daml"
> />
> 
> just using XInclude as it is already specified would allow us to prune
this
> whole discussion and the issues it raises of special syntax, semantics
etc.

Not a bad idea...

XInclude wouldn't come for free (the RDF/XML spec doesn't say that
RDF parsers must grok XInclude) but if we're interested in special
syntax for syntactic inclusion, I'd prefer XInclude syntax, which
is designed for exactly that purpose, rather than daml:imports,
which sorta looks like an RDF property but it's sorta unclear
how to specify that it acts like one.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Wednesday, 11 September 2002 13:08:00 UTC