W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Recursion and loops of Microdata items

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 29 Jun 2011 10:03:34 -0700
Message-ID: <BANLkTimFsxw+O2J3VPAjTikg9pA5+t0uzg@mail.gmail.com>
On Wed, Jun 29, 2011 at 8:47 AM, Philip J?genstedt <philipj at opera.com> wrote:
> Another option would be to let stringification of microdata with itemref
> loops throw and exception and fail, similar to what happens when you try to
> JSON.stringify a JavaScript object with cyclic references. The exact
> approach taken here probably isn't very important, since itemref loops
> aren't valid in the first place.
>
> Note also that other algorithms defined in terms of items and their
> properties need to handle loopiness in some way. That's currently RDF, vCard
> and iCal conversion. Perhaps something like "loopy item" could be defined
> and those algorithms could skip loopy items wherever they occur? Simply
> failing is also an acceptable solution, IMO.

Throwing an exception when the graph is cyclic would be fine with me.

~TJ
Received on Wednesday, 29 June 2011 10:03:34 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC