WG: LANG: owl:ontology

hi jeff,

it is actually quite difficult to find something on this issue.
XInclude itself does not have a problem with namespaces, as the
complete document is included.

The namespace question arises when XInclude is used in combination
of XPointer to include a fragment of a document. This fragment is
specified by the XPointer part of the uri. In our case the XPointer
must reference all children of the root node (rdf:RDF).

The possibility to state different, equivalent XPointers imposes some
difficulties for Implementation.

The xpointer spec itself does not talk about the namespace issue either.
Rather one has to look in the XPath spec, since XPointer relies on XPath
for the addressing.

Now, the XPath spec provides the answer (although a bit cryptic and with
clumpsy formulations)

[SECTION 5.4] http://www.w3.org/TR/xpath#namespace-nodes

[...] This means that an element will have a namespace node:

o for every attribute on the element whose name starts with xmlns:;
o for every attribute on an ancestor element whose name starts xmlns: unless
the element itself or a nearer ancestor redeclares the prefix;
o for an xmlns attribute, if the element or some ancestor has an xmlns
attribute, and the value of the xmlns attribute for the nearest such element
is non-empty

This means, that all namespaces on the way to the included nodes are
collected and
restated at that node. Namespaces with the same prefix that have been
declared in the
including ontology (as attributes of rdf:RDF) will be redefined and
overwritten locally for each node.

Raphael


-----Ursprungliche Nachricht-----
Von: heflin@EECS.Lehigh.EDU [mailto:heflin@EECS.Lehigh.EDU]Im Auftrag
von Jeff Heflin
Gesendet: Donnerstag, 19. September 2002 22:51
An: Raphael Volz
Cc: Webont
Betreff: Re: LANG: owl:ontology


Hi Raphael,

For those of us who don't have time to read the XInclude spec, could you
explain how it would solve the problem of when two ontology documents
have different default namespaces? Usually, these are expressed in the
rdf:RDF tag, but you omit one ontology's RDF tag in your approach. It
seems to me that the imported stuff would get the wrong default
namespace.

Jeff


Raphael Volz wrote:
>
> Hi -
>
> actually Peter is right, since some thing referred to as
> object in a <x, owl:subclassof, y), i.e. y is automagically
> made a class in OWL (by entailment). The only the thing we
> loose is everything else that is said about y in document 1.
>
> I have an alternative proposal for doing the owl:imports,
> which happens to be compatibel with RDF, and uses standard
> W3C technologies, namely XInclude http://www.w3.org/TR/xinclude/, which is
> the candidate
> recommendation for doing inclusion for arbitrary XML.
>
> It would look like this
>
> document 1:
> -----------
> <rdf:RDF>
>
>         <!-- Document metadata -->
>         <owl:Ontology rdf:about="">
>         ...
>         </owl:Ontology>
>
>         <!-- classes -->
>         <owl:Class rdf:ID="foo" />
>         ...
>         <!-- properties -->
>         <owl:Class rdf:ID="bar" />
>         ...
> </rdf:RDF>
>
> document2:
> ----------
> <rdf:RDF>
>         <!-- Inclusion -->
>         <xi:include xi:href="document1#xpointer(/rdf:RDF/*)"/>
>
>         <!-- Document metadata -->
>         <owl:Ontology rdf:about="">
>         ...
>         </owl:Ontology>
>
>         <!-- classes -->
>         <owl:Class rdf:ID="foo2" />
>         ...
>         <!-- properties -->
>         <owl:Class rdf:ID="bar2" />
>         ...
> </rdf:RDF>
>
> result would be
>
> <rdf:RDF>
>         <!-- Included information -->
>                 <!-- Document metadata -->
>         <owl:Ontology rdf:about="file:/document1">
>         ...
>         </owl:Ontology>
>
>         <!-- classes -->
>         <owl:Class rdf:ID="file:/document1#foo" />
>         ...
>         <!-- properties -->
>         <owl:Class rdf:ID="file:/document2/#bar" />
>
>         <!-- Document metadata -->
>         <owl:Ontology about="">
>         ...
>         </owl:Ontology>
>
>         <!-- classes -->
>         <owl:Class rdf:ID="foo2" />
>         ...
>         <!-- properties -->
>         <owl:Class rdf:ID="bar2" /><rdf:RDF>
>         ...
> </rdf:RDF>
>
> The xi:include is valid RDF via a combination of the
> many convenience syntaxes for RDF and turns out to be
> two triples, namely
>
>         <xi:include xi:href="document1#xpointer(/rdf:RDF/*)"/>
> -->
> (@anonymous, rdf:type, xi:include)
> (@anonymous, xi:href, "document1#xpointer(/rdf:RDF/*")
>
> The usage of XPointer does not really impose any realistic
> restriction on implementation, since the XPAth used is
> always the same, namely give me all children elements of rdf:RDF.
>
> Of course, there are alternative, equivalent XPath expressions that
> can say the same, but they are usually more un-intuitive.
>
> The semantics of the operation is a merge of the XML Info Sets of the
> document and the addressed document fragments.
>
> If we restrict our self to simple inclusion and specify the semantics
> as a merger of the RDF graphs, then this operation would exactly do
> that.
>
> Raphael
>
> PS: I tried to send that yesterday, but apparently my emails did not
> arrive...

Received on Friday, 20 September 2002 11:30:33 UTC