Issue #hendler-01 literals in rdf:parseType="Collection"

At 08:46 20/02/2003 +0000, Dave Beckett wrote:


>Brian: please accept this as a last call issue for RDF Core on the
>RDF/XML Syntax specification 2002-01-23

Jim,

This has been recorded as

   http://www.w3.org/2001/sw/RDFCore/20030123-issues/#hendler-01

The WG will respond further in due course.

Thanks for the comment.

Brian


> >>>Jim Hendler said:
> >
> > The RDF Core Working Group documents (particularly [1]) reflect a
> > decision that rdf:parsetype="collection" must be a list if RDF node
> > elements.  I believe the RDF Core WG is making a mistake by
> > prohibiting this from being a list of literals, and to the best of my
> > ability to deduce, there is no technical reason why a list of
> > literals could not be supported.
>
>I'll demonstrate the technical issues with your example, below.
>
> >
> > This decision has terrible ramifications for languages built on top
> > of RDF (like OWL) which thus must use extremely ugly constructs for
> > lists of literals (in fact, constructing the entire list using List,
> > first, and rest).  For example, a natural thing to express in OWL (or
> > RDFS for that matter) might be that the list of permissible scores in
> > a game of tennis are 0, 15, 30, and 40.  However, instead of the
> > construct
> >
> > <owl:oneOf rdf:parsetype="collection">
> >   <score rdf:datatype="xsd:integer">0</score>
> >   <score rdf:datatype="xsd:integer">15</score>
> >   <score rdf:datatype="xsd:integer">30</score>
> >   <score rdf:datatype="xsd:integer">40</score>
> > </owl:oneOf>
> >
> > we must instead
>
>(minor error rdf:parseType="Collection")
>
>I'll complete your example to make it a full rdf/xml document,
>such that it could be sent to the W3C's RDF Validator, although it
>won't work since it doesn't support rdf:datatype at this date.
>
>(Aside, you are using qnames inside the rdf:datatype which is a minor
>error, I'm also correcting with entities).
>
>
>----------------------------------------------------------------------
><?xml version="1.0"?>
><!DOCTYPE rdf:RDF [
>   <!ENTITY xsd 'http://www.w3.org/2000/10/XMLSchema#'>
>   <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
>]>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>          xmlns:owl="http://www.w3.org/2002/07/owl#">
>
>    <rdf:Description rdf:about="http://example.org/">
>         <owl:oneOf>
>           <rdf:List>
>              <rdf:first rdf:datatype="&xsd;integer">0</rdf:first>
>              <rdf:rest>
>                <rdf:List>
>                  <rdf:first rdf:datatype="&xsd;integer">15</rdf:first>
>                  <rdf:rest>
>                    <rdf:List>
>                      <rdf:first rdf:datatype="&xsd;integer">30</rdf:first>
>                      <rdf:rest>
>                        <rdf:List>
>                          <rdf:first 
> rdf:datatype="&xsd;integer">40</rdf:first>
>                          <rdf:rest rdf:resource="&rdf;nil" />
>                        </rdf:List>
>                      </rdf:rest>
>                    </rdf:List>
>                 </rdf:rest>
>               </rdf:List>
>             </rdf:rest>
>           </rdf:List>
>         </owl:oneOf>
>   </rdf:Description>
></rdf:RDF>
>----------------------------------------------------------------------
>
>So these potentially are the triples that OWL wants to use
>(made from my Rapper parser):
>
>_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
><http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
>_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 
>"0"^^<http://www.w3.org/2000/10/XMLSchema#integer> .
>_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
><http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
>_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 
>"15"^^<http://www.w3.org/2000/10/XMLSchema#integer> .
>_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
><http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
>_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 
>"30"^^<http://www.w3.org/2000/10/XMLSchema#integer> .
>_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
><http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
>_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 
>"40"^^<http://www.w3.org/2000/10/XMLSchema#integer> .
>_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> 
><http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
>_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
>_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid3 .
>_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
><http://example.org/> <http://www.w3.org/2002/07/owl#oneOf> _:genid1 .
>
>and this is thus the RDF you want out of it.
>
>Your suggestion:
>
>  <owl:oneOf rdf:parseType="Collection">
>    <score rdf:datatype="xsd:integer">0</score>
>    <score rdf:datatype="xsd:integer">15</score>
>    <score rdf:datatype="xsd:integer">30</score>
>    <score rdf:datatype="xsd:integer">40</score>
>  </owl:oneOf>
>
>doesn't seem to relate to the triples or the expanded RDF/XML at all.
>The 'score' item appears nowhere in the N-Triples.  Is this a crucial
>point?
>
>The historical background to rdf:parseType="Collection" is that it
>was designed to copy how DAML lists work
>(rdf:parseType="daml:Collection") and this list of literals short cut
>was never in that design, which was presented only in the form of an
>example.  DAML lists only ever used resource nodes (URIs) as the list
>contents so that limitation was carried forward.  We extended it to
>include bnodes since the contained node element.
>
>So it would be a new requirement to have literals objects of the
>rdf:first property which has not, to my knowledge, previously been
>asked of the RDF Core working group.
>
>The technical issue of how to invent a new way to allow both the node
>elements and literal objects as the value of the rdf:first statement
>is something the WG can consider.  My immediate reaction is that it
>would require a new piece of rdf/xml syntax.
>
> > I believe the ability to express a collection of datatype values is a
> > very important one, and believe it is a mistake for RDF Core to put
> > this restriction on the use of rdf:parsetype="collection" without a
> > stronger motivation than I can find in the current LC documents.
> >
> >   thanks
> >   Jim Hendler
> >   AC Member, MIND Laboratory
> >
> > p.s. Please note this is an individual comment raised as AC member,
> > not a consensus comment from the web ontology working group nor does
> > it necessarily represent the opinion of any other group or
> > organization with which I am affiliated.  I also apologize if this
> > issue has been brought up before - if it has, just consider this a +1
> > for the objection.
> >
> > [1]
> > 
> http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-parsetype-Collection
> >
> >
> > --
> > Professor James Hendler                                 hendler@cs.umd.edu
> > Director, Semantic Web and Agent Technologies   301-405-2696
> > Maryland Information and Network Dynamics Lab.          301-405-6707 (Fax)
> > Univ of Maryland, College Park, MD 20742        240-731-3822 (Cell)
> > http://www.cs.umd.edu/users/hendler
>
>Thanks for the comment Jim.
>
>Dave

Received on Thursday, 20 February 2003 07:07:45 UTC