[whatwg] Microdata DOM API issues

Tab Atkins Jr. jackalmage at gmail.com
Fri Nov 13 15:34:12 PST 2009


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



More information about the whatwg mailing list