<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>14586</bug_id>
          
          <creation_ts>2011-10-28 15:09:30 +0000</creation_ts>
          <short_desc>Microdata: inconsistency between itemType, getItems and JSON regarding absolute URLs</short_desc>
          <delta_ts>2012-07-18 18:46:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#microdata-dom-api</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59132</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-10-28 15:09:30 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59133</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-10-28 15:19:14 +0000</bug_when>
    <thetext>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 &quot;top-level microdata items whose _types_ include all the types specified in the method&apos;s argument, having obtained the types by splitting the string on spaces.&quot; _types_ is xref&apos;d to [1] which talks about &quot;the absolute URLs obtained by splitting the element&apos;s itemtype attribute&apos;s value on spaces&quot;. Are the types obtained by simply &quot;splitting the string on spaces&quot; or are they restricted to absolute URLs? The note makes it clear that the latter is intended, so &quot;having obtained the types by splitting the string on spaces&quot; 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&apos;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&apos;ll be more painful if we ever want to allow non-URL item types, such as private-use itemtype=&quot;foo&quot; or reverse DNS itemtype=&quot;com.example.Thing&quot;.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#item-types</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59365</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-01 05:56:05 +0000</bug_when>
    <thetext>Ok, I&apos;ll remove the absolute URL filtering.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59411</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-11-01 16:31:54 +0000</bug_when>
    <thetext>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=&apos;&apos; attribute.
http://html5.org/tools/web-apps-tracker?from=6806&amp;to=6807</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59443</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-11-01 21:27:39 +0000</bug_when>
    <thetext>You left this note in http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#json

&quot;Note: Since only absolute URLs can be item types, any tokens in the itemtype attribute that are not absolute URLs are dropped.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59508</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-02 17:01:43 +0000</bug_when>
    <thetext>Oops. Fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59509</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-11-02 17:02:39 +0000</bug_when>
    <thetext>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&amp;to=6813</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>