W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > July 2007

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

From: Ben Adida <ben@adida.net>
Date: Tue, 17 Jul 2007 09:15:01 -0700
Message-ID: <469CEB05.2040908@adida.net>
To: Ivan Herman <ivan@w3.org>
CC: mark.birbeck@x-port.net, RDFa <public-rdf-in-xhtml-tf@w3.org>, SWD WG <public-swd-wg@w3.org>


Ivan,

Great, thanks for pushing on these edge cases, these will help us
determine if we can solve this reasonably or not :)

> - 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.

So, I gave a slightly confusing example that used the rule I mentioned
recently, which is that instanceof would automatically set the subject
for contained nodes. But note that this would happen if we put a @rel on
that UL, which is very likely to happen anyways (why would you have a
floating list without relating it?)

> ------
> 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>
> 	</ul>
> </div>
> 
> yields
> 
> <#A> a:b <#B>.
> <#B> a rdf:List.
> <#B> rdf:first </foo>.
> <#B> rdf:next (</bar> </baz>).

So this is a *very* interesting example. I actually believe that, under
our current rules, this would yield:

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

In other words, the outer DIV just doesn't come into play.

This is because we've come to look at @about as declaring a subject, but
not as an identifier for the current element when the current element is
the object. This may be confusing, though, and it's definitely one of
those edge cases, so let's examine it carefully.

> <div about="#A">
> 	<ul rel="a:b" instanceof="rdf:List">
> 		<li>
>                   <span about="#Y" id="Y"
>                      property="bla:p">foo</span></li>
> 		<li><span about="#X" id="X"
>                      property="bla:p">bar</span></li>
> 		<li><span about="#Z" id="Z"
>                      property="bla:p">baz</span></li>
> 	</ul>
> </div>
> 
> yields with our current rules
> 
> <#A> a:b (<#Y> <#X> <#Z>).
> <#Y> bla:p "foo".
> <#X> bla:p "bar".
> <#Z> bla:p "baz".

I don't think so. I think currently it would yield the other thing you
wrote:

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

You'd have to put the IDs and ABOUTs on the LI, as you put it:

> <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>
> 	</ul>
> </div>

Now, your next example is tough.

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

I don't know how to do this nicely right now.

> <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>
> 	</ul>
> </div>

That would be odd, unless we change some other rules.

So I'm not sure. It may be we're getting ahead of ourselves and we have
no good way to do this cleanly. I'd *like* to solve this, but I don't
want this to become some clunky syntax that looks pasted on. In that
sense, I can see where Keith was coming from in an earlier discussion.

So, let's think about this a bit more, but let's make sure we strike a
compromise: if, as DanC notes, there are few real use cases, then we
must have a dead-simple syntax, or it's not worth it.

-Ben
Received on Tuesday, 17 July 2007 16:18:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:08 GMT