Re: literals in lists.

Garret Wilson <> writes:
> Garret Wilson wrote:
> >
> > Sandro Hawke wrote:
> >> To be clear, an rdf:List can have literals, it's just that
> >> parseType=Collection cannot be used with such lists.
> >>
> >> I'm curious why you prefer rdf:value for this workaround instead of
> >> owl:sameAs....      
> Jeremy's (private) email to me probably contains what Sandro was meaning:
> <rdf:Description>
>    <eg:prop rdf:parseType="Collection">
>       <rdf:Description owl:sameAs="one"/>
>       <rdf:Description owl:sameAs="two"/>
>       <rdf:Description owl:sameAs="three"/>
>    </eg:prop>
> </rdf:Description>

Yes, exactly.   I might throw in some like this:

         <owl:sameAs rdf:datatype="&xs;int">42</owl:sameAs>
to show you can do datatyped literals as well, but the concept is the

> Unfortunately, this assumes that the RDF processor is an inference 
> engine that supports OWL---and provides spurious properties not present 
> if I were to put literals in a full-syntax rdf:List. (On the other hand, 
> rdf:value has no set semantics at all---it's not even a hack, but more 
> like a hack builder.)
> Once I assume an inference engine that understands OWL, I might as well 
> do this:
> <rdf:Description 
> rdf:about="">
>   <owl:sameAs rdf:resource=""/>
> </rdf:Description>

Well, no -- because there might be other uses of rdf:value in some RDF
data you want your data to be used with -- uses which are *not* the same
as owl:sameAs.  But other than that -- sure.

> <rdf:Description>
>    <eg:prop rdf:parseType="Collection">
>       <rdf:Description rdf:value="one"/>
>       <rdf:Description rdf:value="two"/>
>       <rdf:Description rdf:value="three"/>
>    </eg:prop>
> </rdf:Description>
> :)
> But why, why, why?
> I'll stop before this turns into a rant. ;)

I totally understand your frustration.   (I was ranting about this, in a
more private forum, two or three weeks ago.)

I'm not saying this approach to owl:sameAs solves the problem.  It's
still a nasty mess.  I'm justing thinking that using owl:sameAs is
slightly better than using rdf:value.  With owl:sameAs, you actually are
saying, logically, what you want to be saying.  It might even
automatically due the right thing in some systems (although I wouldn't
put any money on it).

I think the medium-impact fix I like the most is to unify rdf:Seq and
rdf:List.  Say that
    <list> rdf:_1 <a>.
entails and is entailed by 
    <list> rdf:first <a>.
in some very low-level RDF semantics.

And then probably throw rdf:List into the syntax like rdf:Seq, different
in that it terminates the list.  rdf:Seq would turn into both rdf:_<n>
triples and rdf:first/rdf:rest stuff, but there would be no rdf:nil at
the end.

(I might turn Bag and Alt into something which is linked to an rdf:List
of the members.)

This is probably too weird, and would cause all sorts of unexpected
stuff to crop up.   Maybe just allowing rdf:li inside
parseType=Collection is the trivial fix.

   -- Sandro

Received on Thursday, 26 July 2007 02:20:09 UTC