[whatwg] Recursion and loops of Microdata items

Tab Atkins Jr. jackalmage at gmail.com
Wed Jun 29 10:03:34 PDT 2011


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



More information about the whatwg mailing list