Re: draft responses for LC comment FH3/29

Bijan Parsia wrote:
> On 9 Mar 2009, at 11:04, Ivan Herman wrote:
> 
>> First of all, don't shoot at the messenger...:-)
> 
> Are we?
> 

I am not sure:-)

>> But I try to anticipate
>> the arguments.
> 
> It might help to anticipate the rebuttals as well :)
>

Absolutely! That is why I've raised this...

>> Peter F. Patel-Schneider wrote:
>>> From: Ivan Herman <ivan@w3.org>
>>> Subject: Re: draft responses for LC comment FH3/29
>>> Date: Mon, 09 Mar 2009 10:17:40 +0100
>>>
>>>> In fact, re-reading Jan's comments, I realize that his remark is a
>>>> little bit different. He understands that the motivation for having
>>>> OWL/XML is to have something that works well in an XML infrastructure
>>>> but his claim is that an RDF WG should come up with an XML encoding of
>>>> RDF that would play well with XML (and use that to encode OWL) rather
>>>> than having a separate OWL/XML syntax.
>>>
>>> I don't see how this could work right.
>>
>> Well, we do have a canonical RDF mapping of OWL. Ie, instead of mapping
>> the result of the RDF mapping to RDF/XML, one could do this with
>> another, XML-tool friendly XML encoding. I am not sure I understand the
>> problem...
> 
> Ok, so I took this RDF/XML fragment:
> 
> <owl:Class rdf:about="#Animal">
>             <rdfs:subClassOf>
>                 <owl:Restriction>
>                     <owl:onProperty rdf:resource="#hasGender"/>
>                     <owl:cardinality
> rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality>
>                 </owl:Restriction>
>             </rdfs:subClassOf>
>         </owl:Class>
> 
> (Animal subClassOf hasGender exactly 1)
> 
>  and encoded it with Trix, which is, in fact, an XML friendly RDF encoding:
> 
> <graph xmlns="http://www.w3.org/2004/03/trix/trix-1/"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://www.w3.org/2004/03/trix/trix-1/
> http://www.w3.org/2004/03/trix/trix-1/trix-1.0.xsd">
>     <uri></uri>
>     <!--
>         <owl:Class rdf:about="#Animal">
>              <rdfs:subClassOf>
>                 <owl:Restriction>
>                     <owl:onProperty rdf:resource="#hasGender"/>
>                     <owl:cardinality
> rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality>
>                 </owl:Restriction>
>             </rdfs:subClassOf>
>         </owl:Class>-->
>     <triple>
>        
> <uri>http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal</uri>
> 
>         <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
>         <uri>http://www.w3.org/2002/07/owl#Class</uri>
>     </triple>
>     <triple>
>         <id>genid:A260</id>
>         <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
>         <uri>http://www.w3.org/2002/07/owl#Restriction</uri>
>     </triple>
>     <triple>
>        
> <uri>http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal</uri>
> 
>         <uri>http://www.w3.org/2000/01/rdf-schema#subClassOf</uri>
>         <id>genid:A260</id>
>     </triple>
>     <triple>
>         <id>genid:A260</id>
>         <uri>http://www.w3.org/2002/07/owl#cardinality</uri>
>         <typedLiteral
> datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</typedLiteral>
> 
>     </triple>
>     <triple>
>         <id>genid:A260</id>
>         <uri>http://www.w3.org/2002/07/owl#onProperty</uri>
>        
> <uri>http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasGender</uri>
> 
>     </triple>
> </graph>
> 
> 
> And I did it in OWL/XML:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Ontology xmlns="http://www.w3.org/2002/07/owl#"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://www.w3.org/2002/07/owl#
> file:/Users/bparsia/Documents/DLista/code/owl-xmlmucking/owlxmlnew.xsd">
>         <Class
> IRI="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal"/>
> 
>         <ObjectExactCardinality cardinality="1">
>             <ObjectProperty
> IRI="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasGender"/>
> 
>         </ObjectExactCardinality>
>     </SubClassOf>
> </Ontology>
> 
> 
> So, things to note:
>     There can be no useful AutoCompletion or validity checking for OWL
> with Trix. You are stuck thinking at the triple level and any schema
> that, e.g., tried to anticipate which triples had to have bnode subjects
> or objects...well, I can't think of how to do it with out scheamtron.
> 

Neither do I. Or it would be horribly complicated (ie, error prone).

>     The queries are brutal (even with sparql). For example, supposed you
> wanted all the exact cardinality axioms. OWL/XML:
>     /Ontology/element(*, Axiom)[./ObjectExactCardinality]
> 
> This will return that axiom. The sparql will be nasty (and require, for
> example, a union in order to catch subclassof, equivalentclasses, etc.)
> The XPath will be similarly nasty and hard to read.This makes anything
> which uses XPath (XSLT, XQuery, Schematron) much harder to use (e.g.,
> you'll just have to encapsulate the query in a function, and those
> functions will be hard to debug, must be ported across Xquery and XSLT,
> are non-standard in Schematron, etc.)

I am not sure SPARQL is relevant for this discussion, because Jan's
issue is around the XML encoding and usage in an XML food chain. But the
example shows that, although things are manageable via some sort of an
XML (eg TriX) encoding + XSLT/XQUERY + XPath (which is Jan's argument)
the result ain't pretty (an understatement:-)

Which probably gives some sort of a sketch answer to Jan...

Thx

Ivan


> 
> This is all well-known stuff. RDF/XML is one problem for the XML
> toolchain. Triples are another, *distinct* issue.
>
> Cheers,
> Bijan.

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 9 March 2009 12:55:04 UTC