Re: @itemref functionality wrt itemtype context

On Tue, Sep 6, 2011 at 9:55 AM, Lin Clark <lin.w.clark@gmail.com> wrote:

> Ivan indicated that I wasn't clear:
>
> For the use case I am explaining, we only need itemref in microdata. We
> probably do not need it in RDFa.
>
> When I said that Drupal needs itemref for microdata, I meant its ability to
> assert name value pairs that are not nested within the entity's HTML
> element. This can be done with about in RDFa, and only needs one value.
>

And we actually already use that functionality in Drupal 7 for asserting the
title and the number of comments of nodes outside the main node HTML
elements (in the <head> tag to be precise) by simply using the @about
attribute every time we want to assert more info about the node. We just
have to make sure we're using the same value in all about attributes, which
is fairly easy using Drupal's APIs.


> We have not yet come upon a use case where we need to reference the same
> item from multiple elements, where we would require multiple about values.
>

One use case we never implemented for lack of a good solution in RDFa is
when two resources of disjoint types share the same property, for example
foaf:Person and sioc:UserAccount sharing the same foaf:name, or more
generally an information resource and a document sharing a label. This is
something which would be possible with less HTML markup cruft if @about was
allowing multiple URIs.

Steph.


>
> This only holds for the basic use cases that I have explored to date. It
> very well could turn out that we need itemref-like functionality in RDFa in
> a future use case.
>
> -Lin
>
> On Tue, Sep 6, 2011 at 12:28 PM, Ivan Herman <ivan@w3.org> wrote:
>
>> Lin,
>>
>> could you give a specific example for the issue you had? I am not sure I
>> understand
>>
>> Thanks!
>>
>> Ivan
>>
>> On Sep 6, 2011, at 13:23 , Lin Clark wrote:
>>
>> > Actually, it wasn't multiple references to the same object that we need
>> itemref for in the microdata implementation. It was that there are often
>> properties that are outside of the entity's branch of the DOM tree, so the
>> only options are to include an invisible meta element for each value,
>> duplicating the values, or to use itemref. Itemref should be better for
>> front end performance because it results in fewer characters for most use
>> cases, so that's why Drupal would need it.
>> >
>> > While the ability of an itemref-ed item to be referenced from multiple
>> elements could come in handy, it isn't a use case I had explored yet. At
>> first glance, having multiple abouts would seem to make RDFa harder to grok,
>> but I haven't really thought deeply about it.
>> >
>> > -Lin
>> >
>> > On Tue, Sep 6, 2011 at 8:18 AM, Ivan Herman <ivan@w3.org> wrote:
>> > Jeni,
>> >
>> > I will play today (or tomorrow) with the implementation of this to see
>> if there are unexpected hiccups. I do not expect any, but one may never
>> know.
>> >
>> > One thing: I wonder, if @about can accept a list of URI-s, whether so
>> should @resource. After all, by virtue of chaining, @resource plays a
>> similar role to @about down the line... Implementation wise this is probably
>> the natural way: the overall change on the processing steps is, I guess,
>> that the values of current object, subject, etc, become all arrays instead
>> of single values, providing a natural set of changes on the steps. So the
>> question is whether, from the user's point of view, we should open up
>> @resource to be an array or not. I must admit I am a bit neutral at this
>> point. The 'why not?' is probably not a good enough argument:-)
>> >
>> > (Obviously, this change would not affect @href, whose syntax and
>> semantics we inherit from HTML.)
>> >
>> > Lin, it would be terrific to get your feedback on whether that type of
>> change would make Drupal's life easier...
>> >
>> > Thanks
>> >
>> > Ivan
>> >
>> > On Sep 6, 2011, at 24:00 , Jeni Tennison wrote:
>> >
>> > > Gregg (etc)
>> > >
>> > > On 3 Sep 2011, at 00:13, Gregg Kellogg wrote:
>> > >> As @itemref is not universally appreciated, and causes a many issues
>> for SAX-based implementations, we discussed possible alternatives. For
>> example, if @about where to take a list of IRIs, rather than just a single
>> IRI, you might have the following:
>> > >>
>> > >> <body vocab="http://schema.org/">
>> > >> <div about="_:m" typeof="schema:Movie">
>> > >>   <p property="schema:name">Pirates of the Carribean: On Stranger
>> Tides (2011)</p>
>> > >> </div>
>> > >> <div about="_:b typeof="schema:Book">
>> > >>   <span property="schema:name">How to Tie a Reef Knot</span>
>> > >>   by <span property="author">John Doe</span>
>> > >> </div>
>> > >> <footer about="_:m _:b">
>> > >>   <p>All content licensed under the
>> > >>     <a rel="license" href="
>> http://www.opensource.org/licenses/mit-license.php">
>> > >>       MIT license
>> > >>     </a>.
>> > >>   </p>
>> > >> </footer>
>> > >> </body>
>> > >
>> > > I agree that the multi-valued about attribute is a way of addressing
>> most of the use cases that led to itemref in microdata which fits quite
>> naturally with RDFa's existing processing.
>> > >
>> > > FWIW, the one thing that I'd point out as a disadvantage to this
>> approach for a publisher is that it means that when the common content (the
>> information about the license of the page) is generated, the code needs to
>> have knowledge of the content of the page.
>> > >
>> > > So the above couldn't be generated by a footer generated by a static
>> template, for example. Conversely, if the pointers go the other way -- items
>> in the body of the page referencing common things in the static content, as
>> in itemref -- that's a lot easier to generate.
>> > >
>> > > I've CCed Lin because she'd mentioned the use of itemref within
>> Drupal, and it would be good to have her thoughts on whether this pattern
>> might work based on that experience.
>> > >
>> > > Cheers,
>> > >
>> > > Jeni
>> > > --
>> > > Jeni Tennison
>> > > http://www.jenitennison.com
>> > >
>> > >
>> >
>> >
>> > ----
>> > Ivan Herman, W3C Semantic Web Activity Lead
>> > Home: http://www.w3.org/People/Ivan/
>> > mobile: +31-641044153
>> > PGP Key: http://www.ivan-herman.net/pgpkey.html
>> > FOAF: http://www.ivan-herman.net/foaf.rdf
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > --
>> > Lin Clark
>> > DERI, NUI Galway
>> >
>> > lin-clark.com
>> > twitter.com/linclark
>> >
>>
>>
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> PGP Key: http://www.ivan-herman.net/pgpkey.html
>> FOAF: http://www.ivan-herman.net/foaf.rdf
>>
>>
>>
>>
>>
>>
>
>
> --
> Lin Clark
> DERI, NUI Galway <http://www.deri.ie/>
>
> lin-clark.com
> twitter.com/linclark
>
>

Received on Wednesday, 7 September 2011 16:32:03 UTC