Re: Attempt for a List specification in RDFa (ISSUE-106)

Ivan,

On 26 Aug 2011, at 11:15, Ivan Herman wrote:
> (I have added the tracker's issue reference to the subject. B.t.w., a series of issues have been generated based on your blog.)

(I saw, thank you :)

> What I think can be done, both from the specification point of view and, I believe, from the processing point of view is something like:
> 
> - If a number of DOM nodes share the same parent, share the same predicate URI (whether it is in a @property or a @rel) and they all have the @member then they are supposed to be in the same list referred to by the (shared) predicate.
> 
> I think this can be implemented and described in terms of DOM transformation: a new, common container node is inserted into the DOM, reparenting the nodes that are at hand, and then follow more or less the same approach as described in 
> 
> http://www.w3.org/2010/02/rdfa/wiki/Lists
> 
> And this is in line with your examples below.

Hmm. I hadn't really intended that the elements needed to be at the same level. For example, given that:

<li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
   typeof="bibo:Book">
 <span property="dc:creator">Grigoris Antoniou</span> and
 <strong><span property="dc:creator">Frank van Harmelen</span></strong>
</li>

would work to give two values for dc:creator, I would expect:

<li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
   typeof="bibo:Book">
 <span property="dc:creator" member>Grigoris Antoniou</span> and
 <strong><span property="dc:creator" member>Frank van Harmelen</span></strong>
</li>

to create a list.

I'm also not sure how your DOM-manipulation approach works. Just to make sure we're on the same wavelength, I would similarly expect:

<li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
   typeof="bibo:Book">
 <span property="dc:creator" member>Grigoris Antoniou</span> from
 <span property="ex:org">Somewhere</span>
 and
 <strong><span property="dc:creator" member>Frank van Harmelen</span></strong>
</li>

to create:

  <http://www.worldcatlibraries.org/isbn/9780262912423>
    a bibo:Book ;
    dc:creator ("Grigoris Antoniou", "Frank van Harmelen") ;
    ex:org "Somewhere" ;
    .

rather than:

  <http://www.worldcatlibraries.org/isbn/9780262912423>
    a bibo:Book ;
    dc:creator [
      a rdf:List ;
      rdf:first "Grigoris Antoniou" ;
      rdf:rest [ 
        a rdf:List ;
        rdf:first "Frank van Harmelen" ;
        rdf:rest rdf:nil ;
      ] ;
      ex:org "Somewhere" ;
    ]
    .

> There is a little bit of a caveat if an @itemref is involved (and RDFa goes along the lines of implementing that); indeed, I am not sure about a structure of the form
> 
> <bla property="foo:bar" member>Blah</bla>
> <bla property="foo:bar" itemref="toto"/>
> ...
> ...
> <bla id="toto" member>blah again</bla>
> 
> (Though I may misunderstand the behaviour of this itemref.) I would be happy to say that the whole list processing ignores this case, though.

In microdata, you're only allowed to put the itemref attribute on an element with itemscope attribute. For something equivalent in RDFa, I'd suggest limiting it to elements that create new subjects. It would be easiest if this could be expressed in terms of the presence of an attribute, eg just those with 'about' or 'typeof' attributes. So the above wouldn't be allowed.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Friday, 26 August 2011 19:45:18 UTC