- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 12 Oct 2011 00:16:40 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/md In directory hutz:/tmp/cvs-serv10059 Modified Files: Overview.html Log Message: Redefine itemtype='' to allow multiple types if they share the same vocabulary. This was by far the most frequently made request at the recent schema.org event (whatwg r6668) Index: Overview.html =================================================================== RCS file: /sources/public/html5/md/Overview.html,v retrieving revision 1.165 retrieving revision 1.166 diff -u -d -r1.165 -r1.166 --- Overview.html 5 Oct 2011 00:07:34 -0000 1.165 +++ Overview.html 12 Oct 2011 00:16:38 -0000 1.166 @@ -320,7 +320,7 @@ <h1>HTML Microdata</h1> <h2 class="no-num no-toc" id="generatedID"></h2> - <h2 class="no-num no-toc" id="editor-s-draft-5-october-2011">Editor's Draft 5 October 2011</h2> + <h2 class="no-num no-toc" id="editor-s-draft-12-october-2011">Editor's Draft 12 October 2011</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -454,7 +454,7 @@ Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 5 October 2011 Editor's Draft. + This specification is the 12 October 2011 Editor's Draft. </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This specification is an extension to the HTML5 language. All @@ -829,12 +829,20 @@ properties, a "name" ("Hedral"), a "desc" ("Hedral is..."), and an "img" ("hedral.jpeg").</p> - </div><p>An item can only have one type. The type gives the context for - the properties, thus defining a vocabulary: a property named "class" - given for an item with the type "http://census.example/person" might - refer to the economic class of an individual, while a property named - "class" given for an item with the type "http://example.com/school/teacher" - might refer to the classroom a teacher has been assigned.<h3 id="global-identifiers-for-items"><span class="secno">1.4 </span>Global identifiers for items</h3><p><i>This section is non-normative.</i><p>Sometimes, an <a href="#concept-item" title="concept-item">item</a> gives + </div><p>The type gives the context for the properties, thus defining a + vocabulary: a property named "class" given for an item with the type + "http://census.example/person" might refer to the economic class of + an individual, while a property named "class" given for an item with + the type "http://example.com/school/teacher" might refer to the + classroom a teacher has been assigned. Several types can share a + vocabulary. For example, the types "<code title="">http://example.org/people/teacher</code>" and "<code title="">http://example.org/people/engineer</code>" could be defined + to use the same vocabulary (though maybe some properties would not + be especially useful in both cases, e.g. maybe the "<code title="">http://example.org/people/engineer</code>" type might not + typically be used with the "<code title="">classroom</code>" + property). Multiple types defined to use the same vocabulary can be + given for a single item by listing the URLs as a space-separated + list in the attribute' value. An item cannot be given two types if + they do not use the same vocabulary, however.<h3 id="global-identifiers-for-items"><span class="secno">1.4 </span>Global identifiers for items</h3><p><i>This section is non-normative.</i><p>Sometimes, an <a href="#concept-item" title="concept-item">item</a> gives information about a topic that has a global identifier. For example, books can be identified by their ISBN number.<p>Vocabularies (as identified by the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute) can be designed such that <a href="#concept-item" title="concept-item">items</a> get associated @@ -924,14 +932,14 @@ or all types if no argument is specified.<p>Each <a href="#concept-item" title="concept-item">item</a> is represented in the DOM by the element on which the relevant <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute is found. These elements have their <code title="dom-itemScope"><a href="#dom-itemscope">element.itemScope</a></code> IDL attribute set to - true.<p>The type of <a href="#concept-item" title="concept-item">items</a> can be + true.<p>The type(s) of <a href="#concept-item" title="concept-item">items</a> can be obtained using the <code title="dom-itemType"><a href="#dom-itemtype">element.itemType</a></code> IDL attribute on the element with the <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute.<div class="example"> <p>This sample shows how the <code title="dom-document-getItems"><a href="#dom-document-getitems">getItems()</a></code> method can be used - to obtain a list of all the top-level microdata items of one type - given in the document:</p> + to obtain a list of all the top-level microdata items of a + particular type given in the document:</p> <pre>var cats = document.getItems("http://example.com/feline");</pre> @@ -1029,49 +1037,54 @@ <li><code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code></li> </ul><h3 id="the-microdata-model"><span class="secno">2.1 </span>The microdata model</h3><p>The microdata model consists of groups of name-value pairs known as <a href="#concept-item" title="concept-item">items</a>.<p>Each group is known as an <a href="#concept-item" title="concept-item">item</a>. - Each <a href="#concept-item" title="concept-item">item</a> can have an <a href="#item-type">item - type</a>, a <a href="#global-identifier">global identifier</a> (if the <a href="#item-type">item - type</a> <a href="#support-global-identifiers-for-items" title="support global identifiers for - items">supports global identifiers for its items</a>), and a list - of name-value pairs. Each name in the name-value pair is known as a - <a href="#the-properties-of-an-item" title="the properties of an item">property</a>, and each - <a href="#the-properties-of-an-item" title="the properties of an item">property</a> has one or - more <a href="#concept-property-value" title="concept-property-value">values</a>. Each <a href="#concept-property-value" title="concept-property-value">value</a> is either a string or + Each <a href="#concept-item" title="concept-item">item</a> can have <a href="#item-types">item + types</a>, a <a href="#global-identifier">global identifier</a> (if the vocabulary + specified by the <a href="#item-types">item types</a> <a href="#support-global-identifiers-for-items">support global + identifiers for items</a>), and a list of name-value pairs. Each + name in the name-value pair is known as a <a href="#the-properties-of-an-item" title="the + properties of an item">property</a>, and each <a href="#the-properties-of-an-item" title="the + properties of an item">property</a> has one or more <a href="#concept-property-value" title="concept-property-value">values</a>. Each <a href="#concept-property-value" title="concept-property-value">value</a> is either a string or itself a group of name-value pairs (an <a href="#concept-item" title="concept-item">item</a>). The names are unordered relative to each other, but if a particular name has multiple values, they do have a relative order.<p>An <a href="#concept-item" title="concept-item">item</a> is said to be a - <dfn id="typed-item">typed item</dfn> when either it has an <a href="#item-type">item type</a>, - or it is the <a href="#concept-property-value" title="concept-property-value">value</a> of a <a href="#the-properties-of-an-item" title="the properties of an - item">property</a> of a <a href="#typed-item">typed item</a>. The - <dfn id="relevant-type">relevant type</dfn> for a <a href="#typed-item">typed item</a> is the <a href="#concept-item" title="concept-item">item</a>'s <a href="#item-type">item type</a>, if it has - one, or else is the <a href="#relevant-type">relevant type</a> of the <a href="#concept-item" title="concept-item">item</a> for which it is a <a href="#the-properties-of-an-item" title="the + <dfn id="typed-item">typed item</dfn> when either it has an <a href="#item-types" title="item + types">item type</a>, or it is the <a href="#concept-property-value" title="concept-property-value">value</a> of a <a href="#the-properties-of-an-item" title="the + properties of an item">property</a> of a <a href="#typed-item">typed item</a>. + The <dfn id="relevant-types">relevant types</dfn> for a <a href="#typed-item">typed item</a> is the + <a href="#concept-item" title="concept-item">item</a>'s <a href="#item-types">item types</a>, if + it has one, or else is the <a href="#relevant-types">relevant types</a> of the <a href="#concept-item" title="concept-item">item</a> for which it is a <a href="#the-properties-of-an-item" title="the properties of an item">property</a>'s <a href="#concept-property-value" title="concept-property-value">value</a>.<h3 id="items"><span class="secno">2.2 </span>Items</h3><p>Every <a href="#html-elements" title="HTML elements">HTML element</a> may have an <dfn id="attr-itemscope" title="attr-itemscope"><code>itemscope</code></dfn> attribute specified. The <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute is a <a href="#boolean-attribute">boolean attribute</a>.<p>An element with the <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified creates a new <dfn id="concept-item" title="concept-item">item</dfn>, a group of name-value pairs.<hr><p>Elements with an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute may have an <dfn id="attr-itemtype" title="attr-itemtype"><code>itemtype</code></dfn> attribute - specified, to give the <a href="#item-type">item type</a> of the <a href="#concept-item" title="concept-item">item</a>.<p>The <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute, if - specified, must have a value that is a <a href="#valid-url">valid URL</a> that - is an <a href="#absolute-url">absolute URL</a>.<p>The <dfn id="item-type">item type</dfn> of an <a href="#concept-item" title="concept-item">item</a> is the value of its element's <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute, if it has one and - its value is not the empty string. If the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute is missing or its - value is the empty string, the <a href="#concept-item" title="concept-item">item</a> is said to have no <a href="#item-type">item - type</a>.<p>The <a href="#item-type">item type</a> must be a type defined in an <span title="other applicable specifications">applicable - specification</span>.<div class="impl"> + specified, to give the <a href="#item-types">item types</a> of the <a href="#concept-item" title="concept-item">item</a>.<p>The <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute, if + specified, must have a value that is an <a href="#unordered-set-of-unique-space-separated-tokens">unordered set of + unique space-separated tokens</a> that are + <span>case-sensitive</span>, each of which is a <a href="#valid-url">valid + URL</a> that is an <a href="#absolute-url">absolute URL</a>, and all of which + are defined to use the same vocabulary.<p>The <dfn id="item-types">item types</dfn> of an <a href="#concept-item" title="concept-item">item</a> are the <a href="#absolute-url" title="absolute + URL">absolute URLs</a> obtained by <a href="#split-a-string-on-spaces" title="split a string on + spaces">splitting the element's <code title="attr-itemtype">itemtype</code> attribute's value on + spaces</a>. If the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> + attribute is missing or parsing it in this way finds no tokens that + are <a href="#absolute-url" title="absolute URL">absolute URLs</a>, the <a href="#concept-item" title="concept-item">item</a> is said to have no <a href="#item-types">item + types</a>.<p>The <a href="#item-types">item types</a> must all be types defined in <span title="other applicable specifications">applicable + specifications</span> and must all be defined to use the same + vocabulary.<div class="impl"> - <p>Except if otherwise specified by that specification, the - <a href="#url">URL</a> given as the <a href="#item-type">item type</a> should not be - automatically dereferenced.</p> + <p>Except if otherwise specified by that specification, the <a href="#url" title="URL">URLs</a> given as the <a href="#item-types">item types</a> should + not be automatically dereferenced.</p> - <p class="note">A specification could define that its <a href="#item-type">item - type</a> can be derefenced to provide the user with help - information, for example. In fact, vocabulary authors are - encouraged to provide useful information at the given + <p class="note">A specification could define that its <a href="#item-types" title="item types">item type</a> can be derefenced to provide + the user with help information, for example. In fact, vocabulary + authors are encouraged to provide useful information at the given <a href="#url">URL</a>.</p> - <p><a href="#item-type" title="item type">Item types</a> are opaque - identifiers, and user agents must not dereference unknown <a href="#item-type" title="item type">item types</a>, or otherwise deconstruct them, - in order to determine how to process <a href="#concept-item" title="concept-item">items</a> that use them.</p> + <p><a href="#item-types">Item types</a> are opaque identifiers, and user agents + must not dereference unknown <a href="#item-types">item types</a>, or otherwise + deconstruct them, in order to determine how to process <a href="#concept-item" title="concept-item">items</a> that use them.</p> </div><p>The <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute must not be specified on elements that do not have an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified.<hr><p>Elements with an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> @@ -1123,7 +1136,7 @@ <li>If the item is a <a href="#typed-item">typed item</a>: a <dfn id="defined-property-name">defined property name</dfn> allowed in this situation according to the - specification that defines the <a href="#relevant-type">relevant type</a> for the + specification that defines the <a href="#relevant-types">relevant types</a> for the item, or</li> <li>If the item is not a <a href="#typed-item">typed item</a>: a string that @@ -1386,7 +1399,7 @@ partial interface <a href="#htmlelement">HTMLElement</a> { // <span>microdata</span> attribute boolean <a href="#dom-itemscope" title="dom-itemScope">itemScope</a>; - attribute DOMString <a href="#dom-itemtype" title="dom-itemType">itemType</a>; + [PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <a href="#dom-itemtype" title="dom-itemType">itemType</a>; attribute DOMString <a href="#dom-itemid" title="dom-itemId">itemId</a>; [PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <a href="#dom-itemref" title="dom-itemRef">itemRef</a>; [PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <a href="#dom-itemprop" title="dom-itemProp">itemProp</a>; @@ -1434,27 +1447,31 @@ representing types. When called, the method must return a <span>live</span> <code>NodeList</code> object containing all the elements in the document, in <a href="#tree-order">tree order</a>, that are each - <a href="#top-level-microdata-items">top-level microdata items</a> with a <a href="#item-type" title="item - type">type</a> equal to one of the types specified in that - argument, having obtained the types by <a href="#split-a-string-on-spaces" title="split a string - on spaces">splitting the string on spaces</a>. If there are no - tokens specified in the argument, or if the argument is missing, - then the method must return a <code>NodeList</code> containing all - the <a href="#top-level-microdata-items">top-level microdata items</a> in the document. When the - method is invoked on a <code>Document</code> object again with the - same argument, the user agent may return the same object as the - object returned by the earlier call. In other cases, a new - <code>NodeList</code> object must be returned.</p> + <a href="#top-level-microdata-items">top-level microdata items</a> with one of their <a href="#item-types" title="item types">types</a> equal to one of the types specified + in that argument, having obtained the types by <a href="#split-a-string-on-spaces" title="split a + string on spaces">splitting the string on spaces</a>. If there + are no tokens specified in the argument, or if the argument is + missing, then the method must return a <code>NodeList</code> + containing all the <a href="#top-level-microdata-items">top-level microdata items</a> in the + document. When the method is invoked on a <code>Document</code> + object again with the same argument, the user agent may return the + same object as the object returned by the earlier call. In other + cases, a new <code>NodeList</code> object must be returned.</p> + + <p class="note">Since a token in the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute that is not an + <a href="#absolute-url">absolute URL</a> is not considered to be one of the item's + <a href="#item-types">item types</a>, any tokens passed to <code title="dom-document-getItems"><a href="#dom-document-getitems">getItems()</a></code> that are not + themselves <a href="#absolute-url" title="absolute URL">absolute URLs</a> will not + find any items.</p> <p>The <dfn id="dom-itemscope" title="dom-itemScope"><code>itemScope</code></dfn> IDL attribute on <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> the <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> content attribute. The <dfn id="dom-itemtype" title="dom-itemType"><code>itemType</code></dfn> IDL attribute on <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> - the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> content attribute, - as if it was a regular string attribute, not a <a href="#url">URL</a> - string attribute. The <dfn id="dom-itemid" title="dom-itemId"><code>itemId</code></dfn> IDL attribute on - <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> the <code title="attr-itemid"><a href="#attr-itemid">itemid</a></code> content attribute. The <dfn id="dom-itemprop" title="dom-itemProp"><code>itemProp</code></dfn> IDL attribute on + the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> content attribute. + The <dfn id="dom-itemid" title="dom-itemId"><code>itemId</code></dfn> IDL attribute + on <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> the <code title="attr-itemid"><a href="#attr-itemid">itemid</a></code> content attribute. The <dfn id="dom-itemprop" title="dom-itemProp"><code>itemProp</code></dfn> IDL attribute on <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> the <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> content attribute. The <dfn id="dom-itemref" title="dom-itemRef"><code>itemRef</code></dfn> IDL attribute on <a href="#html-elements">HTML elements</a> must <a href="#reflect">reflect</a> the <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> content attribute.</p> @@ -1602,11 +1619,14 @@ <li><p>Add <var title="">item</var> to <var title="">memory</var>.</li> - <li><p>If the <var title="">item</var> has an <a href="#item-type">item - type</a>, add an entry to <var title="">result</var> called - "<code title="">type</code>" whose value is the <a href="#item-type">item - type</a> of <var title="">item</var>.</li> + <li><p>If the <var title="">item</var> has any <a href="#item-types">item + types</a>, add an entry to <var title="">result</var> called + "<code title="">type</code>" whose value is an array listing the + <a href="#item-types">item types</a> of <var title="">item</var>, in the order + they were specified on the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute.</p> + <p class="note">Since only <a href="#absolute-url" title="absolute URL">absolute + URLs</a> can be <a href="#item-types">item types</a>, any tokens in the <code title="attr-itemtype"><a href="#attr-itemtype">itemtype</a></code> attribute that are not <a href="#absolute-url" title="absolute URL">absolute URLs</a> are dropped.</li> <li><p>If the <var title="">item</var> has a <a href="#global-identifier">global identifier</a>, add an entry to <var title="">result</var> called "<code title="">id</code>" whose value is the <a href="#global-identifier">global
Received on Wednesday, 12 October 2011 00:16:48 UTC