W3C home > Mailing lists > Public > public-swd-wg@w3.org > July 2007

Re: [RDFa] ISSUE-8: RDF containers in RDFa

From: Ivan Herman <ivan@w3.org>
Date: Tue, 17 Jul 2007 11:00:30 +0200
Message-ID: <469C852E.1060203@w3.org>
To: Ben Adida <ben@adida.net>
CC: mark.birbeck@x-port.net, RDFa <public-rdf-in-xhtml-tf@w3.org>, SWD WG <public-swd-wg@w3.org>

I like the direction this is going, ie, the core of your proposal. There
are some details still be fleshed out, though...

- Strictly speaking this means that, once again, the subject of the
instanceof (to name the beast, at least for this mail:-) is _not_ the
@about up in the chain, but something 'downwards', ie, the blank node
created on the fly (a bit like the @src and @href case we just
discussed). I am not saying it is a problem, I am just saying that this
should be made clear both for users and implementers.

- I played with some alternatives to see if some common patterns fall
out of this proposal and our current rules. As usual, I may have made
mistakes, but I guess it is worth going through them...

Is it correct that

<div about="#A">
	<ul rel="a:b" instanceof="rdf:List" about="#B">
		<li href="/foo">foo</li>
		<li href="/bar">bar</li>
		<li href="/baz">baz</li>


<#A> a:b <#B>.
<#B> a rdf:List.
<#B> rdf:first </foo>.
<#B> rdf:next (</bar> </baz>).

? I am not 100% sure that this _is_ the consequence of our current
rules. (The same if I replace about by a href.) This may have to be
specified explicitly.


Is it correct that

<div about="#A">
	<ul rel="a:b" instanceof="rdf:List">
                  <span about="#Y" id="Y"
		<li><span about="#X" id="X"
		<li><span about="#Z" id="Z"

yields with our current rules

<#A> a:b (<#Y> <#X> <#Z>).
<#Y> bla:p "foo".
<#X> bla:p "bar".
<#Z> bla:p "baz".

? Not sure; if we simply say that the elements of the list is the
content of <li> then, according to our current rules this should yield

<#A> a:b
  ("<span about="#Y" id="Y" property="bla:p">foo</span>"^^rdf:XMLLiteral

Am I wrong?

B.t.w., can I achieve the RDF triplets above by:

<div about="#A">
	<ul rel="a:b" instanceof="rdf:List">
		<li about="#Y" id="Y" property="bla:p">foo</li>
		<li about="#X" id="X" property="bla:p">bar</li>
		<li about="#Z" id="Z" property="bla:p">baz</li>



How would I express something like:

How to express, however, something like:

<#A> a:b ([ bla:bl "foo" ] [ bla:bl "bar" ] [ bla:bl "baz" ])

without using the _:X mechanism (provided the last method above works)?
One would think about something like

<div about="#A">
	<ul rel="a:b" instanceof="rdf:List">
		<li property="bla:p">foo</li>
		<li property="bla:p">bar</li>
		<li property="bla:p">baz</li>

But I do not think that this works with our current rules either: we
create an implicit blank node when, say, there a rel without href, but
we do not have a similar mechanism for @property...

I think all these _can_ be fleshed out, but should be done...


Ben Adida wrote:
> Dan,
> Thanks for your clarifications on this, this is quite useful.
> So I propose the following super simple approach to handling lists and
> containers. I'd like us to consider it because it would really make RDFa
> quite well rounded.
> Effectively, since UL and OL don't really map cleanly to *one* concept
> of an RDF container or collection, I propose we not try to map them. We
> simply use the <LI> structure as syntactic sugar for either rdf:li or
> rdf:first, rdf:next, rdf:nil, where appropriate
> So, for example:
> <ul attr_that_shall_not_be_named="rdf:List">
> <li href="/foo">foo</li>
> <li href="/bar">bar</li>
> <li href="/baz">baz</li>
> </ul>
> yields
> (</foo> , </bar> , </baz>)
> while replacing rdf:List with rdf:Seq or rdf:Bag would yield the
> corresponding RDF container construct.
> Changing from UL to OL doesn't change a thing from the RDFa perspective.
> When there is no @href, we use the content of the LI as a literal,
> possibly overridden by @content.
> Thoughts?
> -Ben
> Dan Connolly wrote:
>> On Thu, 2007-07-12 at 12:02 -0700, Ben Adida wrote:
>> [...]
>>> Two questions, then:
>>> - how does one declare that the range of an RDF property is a list?
>> That one is easier, so I'll take it first:
>> :brothers rdfs:range rdf:List.
>> (there are ways of saying "list of person", but they're
>> a little obscure and not terribly relevant to this discussion.)
>>> - where are lists used in RDF?
>> Good question. I don't know if they're sufficiently commonly
>> used to merit special syntax in RDFa. (you can always
>> spell them out with rdf:first/rdf:rest/rdf:nil).
>> The main use I can think of is in OWL:
>> <#Man> owl:intersectionOf ( <#Person> <#Male> <#Adult> ).
>> This is in contrast with
>> <#Man> owlx:intersectionOf <#Person>, <#Male>, <#Adult>.
>> which is short for:
>> <#Man> owlx:intersectionOf <#Person>.
>> <#Man> owlx:intersectionOf <#Male>.
>> <#Man> owlx:intersectionOf <#Adult>.
>> I hope it's clear why that owlx construct won't work.
>> Hmm... I thought this was written up in
>> http://esw.w3.org/topic/ClosedWorldAssumptions or somewhere
>> near there, but perhaps not, so consider:
>> <#Dan> :brother <#Bob>, <#Tim>.
>> <#Bob> owl:differentFrom <#Joe>.
>> <#Tim> owl:differentFrom <#Joe>.
>> We still don't know whether { <#Dan> :brother <#Joe> } or not.
>> If we want the "and that's all!" property, we need to use lists:
>> <#Dan> :brothers (<#Bob> <#Tim>).
>> <#Bob> owl:differentFrom <#Joe>.
>> <#Tim> owl:differentFrom <#Joe>.
>> Assuming :brothers is functional, we know know that Joe
>> is not among Dan's brothers.


Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Tuesday, 17 July 2007 09:04:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:31:44 UTC