This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html Multipage: http://www.whatwg.org/C#microdata-dom-api Complete: http://www.whatwg.org/c#microdata-dom-api Comment: Microdata: inconsistency between itemType, getItems and JSON regarding absolute URLs Posted from: 83.218.67.122 by philipj@opera.com User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.9.220 Version/12.00
itemType is a plain DOMSettableTokenList, so any tokens are visible, even those that are not absolute URLs. The definition of getItems seems contradictory, talking about "top-level microdata items whose _types_ include all the types specified in the method's argument, having obtained the types by splitting the string on spaces." _types_ is xref'd to [1] which talks about "the absolute URLs obtained by splitting the element's itemtype attribute's value on spaces". Are the types obtained by simply "splitting the string on spaces" or are they restricted to absolute URLs? The note makes it clear that the latter is intended, so "having obtained the types by splitting the string on spaces" must be left-overs from the last spec change. The JSON export algorithm also refers to [1], such that only absolute URLs would be included. It is inconsistent to expose all tokens in itemType but only valid ones via getItems() and JSON. Actually checking that the token is an absolute URL is a bit annoying when implementing (I'm trying to update Live Microdata), so I would prefer that both getItems and the JSON export just treat the tokens as opaque strings and not care that they are URLs. Finally, by having the API filter the types, it'll be more painful if we ever want to allow non-URL item types, such as private-use itemtype="foo" or reverse DNS itemtype="com.example.Thing". [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#item-types
Ok, I'll remove the absolute URL filtering.
Checked in as WHATWG revision r6807. Check-in comment: Remove the requirement that UAs check that item types are syntactically correct after splitting the itemtype='' attribute. http://html5.org/tools/web-apps-tracker?from=6806&to=6807
You left this note in http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#json "Note: Since only absolute URLs can be item types, any tokens in the itemtype attribute that are not absolute URLs are dropped."
Oops. Fixed.
Checked in as WHATWG revision r6813. Check-in comment: Forgot to remove this now false note http://html5.org/tools/web-apps-tracker?from=6812&to=6813