W3C home > Mailing lists > Public > www-rdf-comments@w3.org > January to March 2003

Re: parseType collection

From: Graham Klyne <GK@ninebynine.org>
Date: Tue, 14 Jan 2003 15:18:29 +0000
Message-Id: <5.1.0.14.2.20030114144305.00a03a80@127.0.0.1>
To: Dave Beckett <dave.beckett@bristol.ac.uk>
Cc: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>, www-rdf-comments@w3.org

At 02:07 PM 1/13/03 +0000, Dave Beckett wrote:

> >>>"Peter F. Patel-Schneider" said:
> >
> > OWL is heavily using the new RDF collection syntax.  Thanks for adding it.
> >
> > However, there are a few places where it would be useful to have
> > collections, but where the collection syntax is not allowed.
> >
> > The first case has to do with literals in collections.  I believe that it
> > is not possible to have literals in the collection syntax, so that
> >
> >       <owl:Class>
> >       <owl:oneOf rdf:parseType="Collection">
> >           1
> >         2
> >         3
> >       </owl:oneOf>
> >       </owl:Class>
> >
> > is not legal RDF/XML.  (Typed literals are also not possible.)


I was wondering if this idiom might work (with RDF as defined)...

        <owl:Class>
          <owl:oneOf rdf:parseType="Collection">
            <rdfs:Literal owl:sameIndividualAs="1" />
            <rdfs:Literal owl:sameIndividualAs="2" />
            <rdfs:Literal owl:sameIndividualAs="3" />
          </owl:oneOf>
        </owl:Class>

?

(rdfs:Literal could be rdf:Description or rdfs:Resource)

Or, following the style of datatype values noted in 
http://www.w3.org/TR/owl-ref/:

        <owl:Class>
          <owl:oneOf rdf:parseType="Collection">
            <xsd:decimal rdf:value="1" />
            <xsd:decimal rdf:value="2" />
            <xsd:decimal rdf:value="3" />
          </owl:oneOf>
        </owl:Class>

#g



>True, that is not legal, but you can always write out it in long-form
>(tiresome but possible):
>
>----------------------------------------------------------------------
><?xml version="1.0" encoding="utf-8"?>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>          xmlns:owl="http://www.w3.org/2002/07/owl#">
>   <owl:Class>
>     <owl:oneOf rdf:nodeID="genid1"/>
>   </owl:Class>
>
>   <rdf:List rdf:nodeID="genid1">
>     <rdf:first>1</rdf:first>
>     <rdf:rest rdf:nodeID="genid2"/>
>   </rdf:List>
>
>   <rdf:List rdf:nodeID="genid2">
>     <rdf:first>2</rdf:first>
>     <rdf:rest rdf:nodeID="genid3"/>
>   </rdf:List>
>
>   <rdf:List rdf:nodeID="genid3">
>     <rdf:first>3</rdf:first>
>     <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
>   </rdf:List>
>
></rdf:RDF>
>----------------------------------------------------------------------
>
>or using more abbreviations to remove the rdf:nodeIDs:
>
>----------------------------------------------------------------------
><?xml version="1.0" encoding="utf-8"?>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>          xmlns:owl="http://www.w3.org/2002/07/owl#">
>   <owl:Class>
>     <owl:oneOf>
>       <rdf:List>
>         <rdf:first>1</rdf:first>
>         <rdf:rest>
>           <rdf:List>
>             <rdf:first>2</rdf:first>
>             <rdf:rest>
>               <rdf:List>
>                 <rdf:first>3</rdf:first>
>                 <rdf:rest 
> rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
>               </rdf:List>
>             </rdf:rest>
>          </rdf:List>
>        </rdf:rest>
>     </rdf:List>
>   </owl:Class>
></rdf:RDF>



-------------------
Graham Klyne
<GK@NineByNine.org>
Received on Tuesday, 14 January 2003 12:19:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 14:16:31 GMT