W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] Microdata DOM API issues

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 13 Nov 2009 17:34:12 -0600
Message-ID: <dd0fbad0911131534u16765334k775b08b42ecaa050@mail.gmail.com>
On Fri, Nov 13, 2009 at 5:14 PM, Philip J?genstedt <philipj at opera.com> wrote:
> The itemref mechanism allows creating arbitrary graphs of items, rather than
> the tree of items that is the intended microdata model (right?). Even though
> my default reaction to graphs is "oh cool", for microdata when the domain
> model is a graph you should probably just represent it with a level of
> indirection (RDF).
>
> Options:
> 1. patch the algorithms which can go into recursion
> 2. patch
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#associating-names-with-items>
> to first check if an itemref'd property creates a loop before adding it to
> candidates
> 3. ?
>
> I think I prefer 2.

Looping in data-graphs is often useful, so I'm not sure I want to
throw it out generally.  Your statement in the first paragraph I'm
quoting, though, says that you'd rather leave loops to be defined in
the vocabulary itself?  So loops would be done by, frex, itemprop'ing
a link to the other element rather than itemref'ing the other element
directly?

That would probably be fine, and is compatible with a tree-based data
model like JSON.  Vocabs should know when loops are
permissible/desirable for themselves.

~TJ
Received on Friday, 13 November 2009 15:34:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC