Re: parseType collection

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 UTC