[html5] r3665 - [] (0) Rather than having such a minor variant, just make the item='' property a [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Aug 24 01:01:42 PDT 2009
Author: ianh
Date: 2009-08-24 01:01:41 -0700 (Mon, 24 Aug 2009)
New Revision: 3665
Modified:
index
source
Log:
[] (0) Rather than having such a minor variant, just make the item='' property always have a single type, and remove all the multitype features.
Modified: index
===================================================================
--- index 2009-08-24 07:38:54 UTC (rev 3664)
+++ index 2009-08-24 08:01:41 UTC (rev 3665)
@@ -7466,7 +7466,7 @@
readonly attribute <a href=#domstringmap>DOMStringMap</a> <a href=#dom-dataset title=dom-dataset>dataset</a>;
// <a href=#microdata>microdata</a>
- [PutForwards=<a href=#dom-domsettabletokenlist-value title=dom-DOMSettableTokenList-value>value</a>] readonly attribute <a href=#domsettabletokenlist>DOMSettableTokenList</a> <a href=#dom-item title=dom-item>item</a>;
+ attribute DOMString <a href=#dom-item title=dom-item>item</a>;
[PutForwards=<a href=#dom-domsettabletokenlist-value title=dom-DOMSettableTokenList-value>value</a>] readonly attribute <a href=#domsettabletokenlist>DOMSettableTokenList</a> <a href=#dom-itemprop title=dom-itemprop>itemprop</a>;
readonly attribute <a href=#htmlpropertycollection>HTMLPropertyCollection</a> <a href=#dom-properties title=dom-properties>properties</a>;
attribute DOMString <a href=#dom-content title=dom-content>content</a>;
@@ -41951,14 +41951,14 @@
<div class=example>
- <p>Here there are two items, each of which have the property "com.example.name":</p>
+ <p>Here there are two items, each of which have the property "name":</p>
<pre><div item>
- <p>My name is <span itemprop="com.example.name">Elizabeth</span>.</p>
+ <p>My name is <span itemprop="name">Elizabeth</span>.</p>
</div>
<div item>
- <p>My name is <span itemprop="com.example.name">Daniel</span>.</p>
+ <p>My name is <span itemprop="name">Daniel</span>.</p>
</div></pre>
</div>
@@ -41970,9 +41970,9 @@
<p>Here the item has three properties:</p>
<pre><div item>
- <p>My name is <span itemprop="com.example.name">Neil</span>.</p>
- <p>My band is called <span itemprop="com.example.band">Four Parts Water</span>.</p>
- <p>I am <span itemprop="com.example.nationality">British</span>.</p>
+ <p>My name is <span itemprop="name">Neil</span>.</p>
+ <p>My band is called <span itemprop="band">Four Parts Water</span>.</p>
+ <p>I am <span itemprop="nationality">British</span>.</p>
</div></pre>
</div>
@@ -41984,10 +41984,10 @@
<div class=example>
- <p>In this example, the item has one property, "com.example.image", whose value is a URL:</p>
+ <p>In this example, the item has one property, "image", whose value is a URL:</p>
<pre><div item>
- <img itemprop="com.example.image" src="google-logo.png" alt="Google">
+ <img itemprop="image" src="google-logo.png" alt="Google">
</div></pre>
</div>
@@ -41999,10 +41999,10 @@
<div class=example>
<p>In this example, the item has one property,
- "com.example.birthday", whose value is a date:</p>
+ "birthday", whose value is a date:</p>
<pre><div item>
- I was born on <time itemprop="com.example.birthday" datetime="2009-05-10">May 10th 2009</time>.
+ I was born on <time itemprop="birthday" datetime="2009-05-10">May 10th 2009</time>.
</div></pre>
</div>
@@ -42020,16 +42020,16 @@
inner one represents a band:</p>
<pre><div item>
- <p>Name: <span itemprop="com.example.name">Amanda</span></p>
- <p>Band: <span itemprop="com.example.band" item> <span itemprop="com.example.name">Jazz Band</span> (<span itemprop="com.example.size">12</span> players)</span></p>
+ <p>Name: <span itemprop="name">Amanda</span></p>
+ <p>Band: <span itemprop="band" item> <span itemprop="name">Jazz Band</span> (<span itemprop="size">12</span> players)</span></p>
</div></pre>
- <p>The outer item here has two properties, "com.example.name" and
- "com.example.band". The "com.example.name" is "Amanda", and the
- "com.example.band" is an item in its own right, with two
- properties, "com.example.name" and "com.example.size". The
- "com.example.name" of the band is "Jazz Band", and the
- "com.example.size" is "12".</p>
+ <p>The outer item here has two properties, "name" and
+ "band". The "name" is "Amanda", and the
+ "band" is an item in its own right, with two
+ properties, "name" and "size". The
+ "name" of the band is "Jazz Band", and the
+ "size" is "12".</p>
<p>The outer item in this example is a top-level microdata
item.</p>
@@ -42048,16 +42048,15 @@
properties are separated from their <a href=#concept-item title=concept-item>items</a>:</p>
<pre><div item id="amanda"></div>
-<p>Name: <span subject="amanda" itemprop="com.example.name">Amanda</span></p>
-<div subject="amanda" itemprop="com.example.band" item id="jazzband"></div>
-<p>Band: <span subject="jazzband" itemprop="com.example.name">Jazz Band</span></p>
-<p>Size: <span subject="jazzband" itemprop="com.example.size">12</span> players</p></pre>
+<p>Name: <span subject="amanda" itemprop="name">Amanda</span></p>
+<div subject="amanda" itemprop="band" item id="jazzband"></div>
+<p>Band: <span subject="jazzband" itemprop="name">Jazz Band</span></p>
+<p>Size: <span subject="jazzband" itemprop="size">12</span> players</p></pre>
<p>This gives the same result as the previous example. The first
- item has two properties, "com.example.name", set to "Amanda", and
- "com.example.band", set to another item. That second item has two
- further properties, "com.example.name", set to "Jazz Band", and
- "com.example.size", set to "12".</p>
+ item has two properties, "name", set to "Amanda", and "band", set
+ to another item. That second item has two further properties,
+ "name", set to "Jazz Band", and "size", set to "12".</p>
</div>
@@ -42071,13 +42070,13 @@
<pre><div item>
<p>Flavors in my favorite ice cream:</p>
<ul>
- <li itemprop="com.example.flavor">Lemon sorbet</li>
- <li itemprop="com.example.flavor">Apricot sorbet</li>
+ <li itemprop="flavor">Lemon sorbet</li>
+ <li itemprop="flavor">Apricot sorbet</li>
</ul>
</div></pre>
<p>This thus results in an item with two properties, both
- "com.example.flavor", having the values "Lemon sorbet" and "Apricot
+ "flavor", having the values "Lemon sorbet" and "Apricot
sorbet".</p>
</div>
@@ -42089,11 +42088,11 @@
<div class=example>
<p>Here we see an item with two properties,
- "com.example.favorite-color" and "com.example.favorite-fruit", both
+ "favorite-color" and "favorite-fruit", both
set to the value "orange":</p>
<pre><div item>
- <span itemprop="com.example.favorite-color com.example.favorite-fruit">orange</span>
+ <span itemprop="favorite-color favorite-fruit">orange</span>
</div></pre>
</div>
@@ -42109,10 +42108,10 @@
<pre><figure>
<img src="castle.jpeg">
- <legend><span item><span itemprop="net.example.name">The Castle</span></span> (1986)</legend>
+ <legend><span item><span itemprop="name">The Castle</span></span> (1986)</legend>
</figure></pre>
- <pre><span item><meta itemprop="net.example.name" content="The Castle"></span>
+ <pre><span item><meta itemprop="name" content="The Castle"></span>
<figure>
<img src="castle.jpeg">
<legend>The Castle (1986)</legend>
@@ -42120,7 +42119,7 @@
<p>Both have a figure with a caption, and both, completely
unrelated to the figure, have an item with a name-value pair with
- the name "net.example.name" and the value "The Castle". The only
+ the name "name" and the value "The Castle". The only
difference is that if the user drags the caption out of the
document, in the former case, the item will be included in the
drag-and-drop data. In neither case is the image in any way
@@ -42140,8 +42139,8 @@
make new uses of the markup.</p>
<p>For this purpose, it is necessary to give each <a href=#concept-item title=concept-item>item</a> a type, such as
- "com.example.person", or "com.example.cat", or
- "com.example.band". Types are identified in three ways:</p>
+ "com.example.person", or "org.example.cat", or
+ "net.example.band". Types are identified in three ways:</p>
<ul class=brief><li>As <a href=#url title=URL>URLs</a>.
@@ -42158,61 +42157,29 @@
as the value of the <code title=attr-item><a href=#items:-the-item-attribute>item</a></code>
attribute.</p>
- <p>When using custom typed items, the property names are also given
- in the form of <a href=#url title=URL>URLs</a> or <a href=#valid-reversed-dns-identifier title="valid
- reversed DNS identifier">reversed DNS labels</a>.</p>
-
<div class=example>
<p>Here, the item is "org.example.animals.cat":</p>
<pre><section item="org.example.animal.cat">
- <h1 itemprop="org.example.name">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
+ <h1 itemprop="name">Hedral</h1>
+ <p itemprop="desc">Hedral is a male american domestic
shorthair, with a fluffy black fur with white paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
+ <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
</section></pre>
<p>In this example the "org.example.animals.cat" item has three
- properties, an "org.example.name" ("Hedral"), an "org.example.desc"
- ("Hedral is..."), and an "org.example.img" ("hedral.jpeg").</p>
+ properties, a "name" ("Hedral"), a "desc" ("Hedral is..."), and an
+ "img" ("hedral.jpeg").</p>
</div>
- <p>An item can have several types, in the same way that an element
- can declare several properties at once.</p>
-
- <div class=example>
-
- <p>Here, the item is both an "org.example.animals.cat" and a "com.example.feline":</p>
-
-<pre><section item="org.example.animal.cat com.example.feline">
- <h1 itemprop="org.example.name com.example.fn">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
- shorthair, with a fluffy <span
- itemprop="com.example.color">black</span> fur with <span
- itemprop="com.example.color">white</span> paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
-</section></pre>
-
- <p>This example has one item with two types and the following
- properties:</p>
-
- <table><thead><tr><td>Property
- <td>Value
- <tbody><tr><td>org.example.name
- <td>Hedral
- <tr><td>com.example.fn
- <td>Hedral
- <tr><td>org.example.desc
- <td>Hedral is a male american domestic shorthair, with a fluffy black fur with white paws and belly.
- <tr><td>com.example.color
- <td>black
- <tr><td>com.example.color
- <td>white
- <tr><td>org.example.img
- <td>.../hedral.jpeg
- </table></div>
+ <p>An item can only have one type. The type gives the context for
+ the properties: a property named "class" given for an item with the
+ type "com.example.census.person" might refer to the class of an
+ individual, while a property named "class" given for an item with
+ the type "com.example.school.teacher" might refer to the classroom a
+ teacher has been assigned.</p>
@@ -42226,8 +42193,9 @@
existing vocabularies, as this makes content re-use easier.</p>
<p>When designing new vocabularies, identifiers can be created
- either using <a href=#url title=URL>URLs</a> or <a href=#valid-reversed-dns-identifier title="valid
- reversed DNS identifier">reversed DNS labels</a>. For URLs
+ either using <a href=#url title=URL>URLs</a>, <a href=#valid-reversed-dns-identifier title="valid
+ reversed DNS identifier">reversed DNS labels</a>, or, for
+ properties, as plain words (with no dots or colons). For URLs
conflicts with other vocabularies can be avoided by only using
identifiers that correspond to pages that the author has control
over. Similarly, for reversed DNS labels conflicts can be avoided by
@@ -42243,7 +42211,53 @@
</div>
+ <p>Properties whose names are just plain words can only be used
+ within the context of the types for which they are intended;
+ properties named using URLs or reversed DNS labels can be reused in
+ items of any type. If an item has no type, and is not part of
+ another item, then if its properties have names that are just plain
+ words, they are not intended to be globally unique, and are instead
+ only intended for limited use. Generally speaking, authors are
+ encouraged to use either properties with globally unique names
+ (URLs, reversed DNS labels) or ensure that their items are
+ typed.</p>
+ <div class=example>
+
+ <p>Here, an item is an "org.example.animals.cat", and most of the
+ properties have names that are words defined in the context of that
+ type. There are also a few additional properties whose names come
+ from other vocabularies.</p>
+
+<pre><section item="org.example.animal.cat">
+ <h1 itemprop="name com.example.fn">Hedral</h1>
+ <p itemprop="desc">Hedral is a male american domestic
+ shorthair, with a fluffy <span
+ itemprop="com.example.color">black</span> fur with <span
+ itemprop="com.example.color">white</span> paws and belly.</p>
+ <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
+</section></pre>
+
+ <p>This example has one item with two types and the following
+ properties:</p>
+
+ <table><thead><tr><td>Property
+ <td>Value
+ <tbody><tr><td>name
+ <td>Hedral
+ <tr><td>com.example.fn
+ <td>Hedral
+ <tr><td>desc
+ <td>Hedral is a male american domestic shorthair, with a fluffy black fur with white paws and belly.
+ <tr><td>com.example.color
+ <td>black
+ <tr><td>com.example.color
+ <td>white
+ <tr><td>img
+ <td>.../hedral.jpeg
+ </table></div>
+
+
<h4 id=predefined-vocabularies><span class=secno>5.1.5 </span>Predefined vocabularies</h4>
<p><i>This section is non-normative.</i></p>
@@ -42287,13 +42301,12 @@
or all types if no argument is specified.</p>
<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-item><a href=#items:-the-item-attribute>item</a></code> attribute is found. The various types
- that the element has can be obtained using the <code title=dom-item><a href=#dom-item>element.item</a></code> DOM attribute, which returns a
- <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object.</p>
+ DOM by the element on which the relevant <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute is found. The type of that
+ element can be obtained using the <code title=dom-item><a href=#dom-item>element.item</a></code> DOM attribute.</p>
<div class=example>
- <p>This sample how the <code title=dom-document-getItems><a href=#dom-document-getitems>getItems()</a></code> method can be used
+ <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>
@@ -42315,11 +42328,11 @@
<div class=example>
<p>This sample gets the first item of type "net.example.user" and
- then pops up an alert using the "net.example.name" property from
+ then pops up an alert using the "name" property from
that item.</p>
<pre>var user = document.getItems('net.example.user')[0];
-alert('Hello ' + user.properties['net.example.name'][0].content + '!');</pre>
+alert('Hello ' + user.properties['name'][0].content + '!');</pre>
</div>
@@ -42332,11 +42345,11 @@
<div class=example>
- <p>In an earlier example, a "com.example.feline" item had two
+ <p>In an earlier example, a "org.example.animals.cat" item had two
"com.example.color" values. This script looks up the first such
item and then lists all its values.</p>
- <pre>var cat = document.getItems('com.example.feline')[0];
+ <pre>var cat = document.getItems('org.example.animals.cat')[0];
var colors = cat.properties['com.example.color'].contents;
var result;
if (colors.length == 0) {
@@ -42377,23 +42390,23 @@
<p>If faced with the following from an earlier example:</p>
- <pre><section item="org.example.animal.cat com.example.feline">
- <h1 itemprop="org.example.name com.example.fn">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
+ <pre><section item="org.example.animal.cat">
+ <h1 itemprop="name com.example.fn">Hedral</h1>
+ <p itemprop="desc">Hedral is a male american domestic
shorthair, with a fluffy <span
itemprop="com.example.color">black</span> fur with <span
itemprop="com.example.color">white</span> paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
+ <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
</section></pre>
<p>...it would result in the following output:</p>
<ul><li>
- <ul><li>org.example.name</li>
+ <ul><li>name</li>
<li>com.example.fn</li>
- <li>org.example.desc</li>
+ <li>desc</li>
<li>com.example.color</li>
- <li>org.example.img</li>
+ <li>img</li>
</ul></li>
</ul><p>(The duplicate occurrence of "com.example.color" is not included
in the list.)</p>
@@ -42423,13 +42436,11 @@
specified creates a new <a href=#concept-item title=concept-item>item</a>, a
group of name-value pairs.</p>
- <p>The 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>
- representing the types (if any) of the <a href=#concept-item title=concept-item>item</a>.</p>
+ <p>The attribute, if specified, must have a value that is either:</p>
- <p>Each token must be either:</p>
+ <ul><li>The empty string, or</li>
- <ul><li>A <a href=#valid-url>valid URL</a> that is an <a href=#absolute-url>absolute URL</a>
+ <li>A <a href=#valid-url>valid URL</a> that is an <a href=#absolute-url>absolute URL</a>
for which the string "<code title="">http://www.w3.org/1999/xhtml/custom#</code>" is not a
<a href=#prefix-match>prefix match</a>, or</li>
@@ -42437,16 +42448,12 @@
<li>A <a href=#predefined-type>predefined type</a>.</li>
- </ul><p>If any of the tokens are a <a href=#predefined-type>predefined type</a>, then
- there must not be any other tokens that are <a href=#predefined-type title="predefined
- type">predefined types</a>.</p>
+ </ul><p>The <dfn id=item-type>item type</dfn> of an element with an <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute is the value of the
+ element's <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute. If the
+ attribute's value is the empty string, the element is said to have
+ no <a href=#item-type>item type</a>.</p>
- <p>The <dfn id=item-types>item types</dfn> of an element with an <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute are the tokens that the
- element's <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute is found to
- contain when its value is <a href=#split-a-string-on-spaces title="split a string on
- spaces">split on spaces</a>.</p>
-
<h4 id=associating-names-with-items><span class=secno>5.2.3 </span>Associating names with items</h4>
<p>The <dfn id=attr-subject title=attr-subject><code>subject</code></dfn>
@@ -42512,8 +42519,18 @@
<li>A <a href=#valid-reversed-dns-identifier>valid reversed DNS identifier</a>, or</li>
- <li>A <a href=#predefined-property-name>predefined property name</a> allowed in this situation.</li>
+ <li>A <a href=#predefined-global-property-name>predefined global property name</a> allowed in this
+ situation, or</li>
+ <li>If the item's <a href=#item-type>item type</a> is itself a
+ <a href=#predefined-type>predefined type</a>: a <a href=#predefined-property-name>predefined property
+ name</a> allowed in this situation, or</li>
+
+ <li>If the item's <a href=#item-type>item type</a> is not a <a href=#predefined-type>predefined
+ type</a>: a string that contains no U+002E FULL STOP (.) or
+ U+003A COLON (:) characters, and that is not a <a href=#predefined-global-property-name>predefined
+ global property name</a>.</li>
+
</ul><p>The <dfn id=property-names>property names</dfn> of an element are the tokens that
the element's <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute
is found to contain when its value is <a href=#split-a-string-on-spaces title="split a string on
@@ -42637,9 +42654,9 @@
<dd>
- <p>Returns a <code>NodeList</code> of the elements in the <code>Document</code> that create <a href=#concept-item title=concept-item>items</a>, that are not part of other <a href=#concept-item title=concept-item>items</a>, and that have all the types given in the argument, if any.</p>
+ <p>Returns a <code>NodeList</code> of the elements in the <code>Document</code> that create <a href=#concept-item title=concept-item>items</a>, that are not part of other <a href=#concept-item title=concept-item>items</a>, and that are of one of the types given in the argument, if any are listed.</p>
- <p>The <var title="">types</var> argument is interpreted as a space-separated list of classes.</p>
+ <p>The <var title="">types</var> argument is interpreted as a space-separated list of types.</p>
</dd>
@@ -42671,12 +42688,13 @@
space-separated tokens</a> representing types. When called, the
method must return a live <code>NodeList</code> object containing
all the elements in the document, in <a href=#tree-order>tree order</a>, that
- are <a href=#top-level-microdata-items>top-level microdata items</a> that have all the <a href=#item-types title="item types">types</a> specified in that argument, having
- obtained the types by <a href=#split-a-string-on-spaces title="split a string on
- spaces">splitting a 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.</p>
+ 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.</p>
<p>The <dfn id=dom-item title=dom-item><code>item</code></dfn> DOM attribute
on elements must <a href=#reflect>reflect</a> the element's <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> content attribute.</p>
@@ -42740,16 +42758,18 @@
<p>A number of <dfn id=predefined-type title="predefined type">predefined types</dfn>
exist, for describing common structures. Each such type has a set of
<dfn id=predefined-property-name title="predefined property name">predefined property
- names</dfn> that are used to describe data of that type.</p>
+ names</dfn> that are used to describe data of that type. In
+ addition, there are some <dfn id=predefined-global-property-name title="predefined global property
+ name">predefined global property names</dfn> that can be used for
+ any item.</p>
<h4 id=general><span class=secno>5.4.1 </span>General</h4>
- <p>The <dfn id=md-about title=md-about><code>about</code></dfn> property can
- be used to name an <a href=#concept-item title=concept-item>item</a> for the
- purposes of identifying or refering to the data defined in that
- item.</p>
+ <p>The <a href=#predefined-global-property-name>predefined global property name</a> <dfn id=md-about title=md-about><code>about</code></dfn> can be used to name an
+ <a href=#concept-item title=concept-item>item</a> for the purposes of
+ identifying or refering to the data defined in that item.</p>
<p>A single property with the name <code title=md-about><a href=#md-about>about</a></code> may be present within each <a href=#concept-item title=concept-item>item</a>. Its <a href=#concept-property-value title=concept-property-value>value</a> must be an
<a href=#absolute-url>absolute URL</a>.</p>
@@ -44721,12 +44741,9 @@
<ol><li><p>Let <var title="">result</var> be an empty object.</li>
- <li><p>Let <var title="">types</var> be an empty array.</li>
+ <li><p>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>For each <a href=#item-types title="item types">item type</a> <var title="">type</var> of <var title="">item</var>, append <var title="">type</var> to <var title="">types</var>.</li>
-
- <li><p>Add an entry to <var title="">result</var> called "<code title="">type</code>" whose value is the array <var title="">types</var>.</li>
-
<li><p>Let <var title="">properties</var> be an empty
object.</li>
@@ -44902,32 +44919,29 @@
property. Otherwise, let <var title="">subject</var> be a new blank
node.</li>
- <li><p>Let <var title="">is-work</var> be false.</li>
+ <li><p>Let <var title="">type</var> be the <a href=#item-type>item type</a>
+ of <var title="">item</var>.</li>
<li>
- <p>For each <a href=#item-types title="item types">item type</a> <var title="">type</var> of <var title="">item</var>, run the following
- substeps:</p>
+ <p>If <var title="">type</var> is neither the empty string nor an
+ <a href=#absolute-url>absolute URL</a>, then let <var title="">type</var> be
+ the result of concatenating the string "<code title="">http://www.w3.org/1999/xhtml/custom#</code>" with the
+ <var title="">type</var>, with any characters in <var title="">type</var> that are not valid in the <ifragment>
+ production of the IRI syntax being %-escaped.</p>
- <ol><li><p>If <var title="">type</var> is <code title=md-work><a href=#md-work>work</a></code>, let <var title="">is-work</var> be
- true.</li>
+ </li>
- <li><p>If <var title="">type</var> is not an <a href=#absolute-url>absolute
- URL</a>, then let <var title="">type</var> be the result of
- concatenating the string "<code title="">http://www.w3.org/1999/xhtml/custom#</code>" with <var title="">type</var>, with any characters in <var title="">type</var> that are not valid in the <ifragment>
- production of the IRI syntax being %-escaped. <a href=#refsRFC3987>[RFC3987]</a></li>
+ <li>
- <li>
+ <p>If <var title="">type</var> is not the empty string, generate
+ the following triple:</p>
- <p>Generate the following triple:</p>
+ <dl class=triple><dt>subject <dd> <var title="">subject</var>
+ <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
+ <dt>object <dd> <var title="">type</var>
+ </dl></li>
- <dl class=triple><dt>subject <dd> <var title="">subject</var>
- <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
- <dt>object <dd> <var title="">type</var>
- </dl></li>
-
- </ol></li>
-
<li>
<p>For each element <var title="">element</var> that has one or
@@ -44957,12 +44971,15 @@
<ol><li><p>If <var title="">name</var> is equal to the string
"<code title=md-about><a href=#md-about>about</a></code>", skip this name.</li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and <var title="">name</var> is equal to the string "<code title=md-work-title><a href=#md-work-title>title</a></code>", let <var title="">name</var> be the string "<code title="">http://purl.org/dc/elements/1.1/title</code>".</li>
+ <li><p>Otherwise, if <var title="">type</var> is <code title=md-work><a href=#md-work>work</a></code>, and <var title="">name</var> is
+ equal to the string "<code title=md-work-title><a href=#md-work-title>title</a></code>",
+ let <var title="">name</var> be the string "<code title="">http://purl.org/dc/elements/1.1/title</code>".</li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and <var title="">name</var> is equal to the string "<code title=md-work-author><a href=#md-work-author>author</a></code>", let <var title="">name</var> be the string "<code title="">http://creativecommons.org/ns#attributionName</code>".</li>
+ <li><p>Otherwise, if <var title="">type</var> is <code title=md-work><a href=#md-work>work</a></code>, and <var title="">name</var> is
+ equal to the string "<code title=md-work-author><a href=#md-work-author>author</a></code>", let <var title="">name</var> be the string "<code title="">http://creativecommons.org/ns#attributionName</code>".</li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and
- <var title="">name</var> is equal to the string "<code title=md-work-license><a href=#md-work-license>license</a></code>", let <var title="">name</var> be the string "<code title="">http://www.w3.org/1999/xhtml/vocab#license</code>".</li>
+ <li><p>Otherwise, if <var title="">type</var> is <code title=md-work><a href=#md-work>work</a></code>, and <var title="">name</var> is
+ equal to the string "<code title=md-work-license><a href=#md-work-license>license</a></code>", let <var title="">name</var> be the string "<code title="">http://www.w3.org/1999/xhtml/vocab#license</code>".</li>
<li><p>Otherwise, if <var title="">name</var> is not an
<a href=#absolute-url>absolute URL</a>, then let <var title="">name</var> be
Modified: source
===================================================================
--- source 2009-08-24 07:38:54 UTC (rev 3664)
+++ source 2009-08-24 08:01:41 UTC (rev 3665)
@@ -7571,7 +7571,7 @@
readonly attribute <span>DOMStringMap</span> <span title="dom-dataset">dataset</span>;
// <span>microdata</span>
- [PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <span title="dom-item">item</span>;
+ attribute DOMString <span title="dom-item">item</span>;
[PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <span title="dom-itemprop">itemprop</span>;
readonly attribute <span>HTMLPropertyCollection</span> <span title="dom-properties">properties</span>;
attribute DOMString <span title="dom-content">content</span>;
@@ -46984,915 +46984,6 @@
<div class="example">
- <p>Here there are two items, each of which have the property "com.example.name":</p>
-
- <pre><div item>
- <p>My name is <span itemprop="com.example.name">Elizabeth</span>.</p>
-</div>
-
-<div item>
- <p>My name is <span itemprop="com.example.name">Daniel</span>.</p>
-</div></pre>
-
- </div>
-
- <p>Properties generally have values that are strings.</p>
-
- <div class="example">
-
- <p>Here the item has three properties:</p>
-
- <pre><div item>
- <p>My name is <span itemprop="com.example.name">Neil</span>.</p>
- <p>My band is called <span itemprop="com.example.band">Four Parts Water</span>.</p>
- <p>I am <span itemprop="com.example.nationality">British</span>.</p>
-</div></pre>
-
- </div>
-
- <p>Properties can also have values that are <span
- title="URL">URLs</span>. This is achieved using the <code>a</code>
- element and its <code title="attr-hyperlink-href">href</code>
- attribute, the <code>img</code> element and its <code
- title="attr-img-src">src</code> attribute, or other elements that
- link to or embed external resources.</p>
-
- <div class="example">
-
- <p>In this example, the item has one property, "com.example.image", whose value is a URL:</p>
-
- <pre><div item>
- <img itemprop="com.example.image" src="google-logo.png" alt="Google">
-</div></pre>
-
- </div>
-
- <p>Properties can also have values that are dates, times, or dates
- and times. This is achieved using the <code>time</code> element and
- its <code title="attr-time-datetime">datetime</code> attribute.</p>
-
- <div class="example">
-
- <p>In this example, the item has one property,
- "com.example.birthday", whose value is a date:</p>
-
- <pre><div item>
- I was born on <time itemprop="com.example.birthday" datetime="2009-05-10">May 10th 2009</time>.
-</div></pre>
-
- </div>
-
- <p>Properties can also themselves be groups of name-value pairs, by
- putting the <code title="attr-item">item</code> attribute on the
- element that declares the property.</p>
-
- <p>Items that are not part of others are called <span>top-level
- microdata items</span>.</p>
-
- <div class="example">
-
- <p>In this example, the outer item represents a person, and the
- inner one represents a band:</p>
-
- <pre><div item>
- <p>Name: <span itemprop="com.example.name">Amanda</span></p>
- <p>Band: <span itemprop="com.example.band" item> <span itemprop="com.example.name">Jazz Band</span> (<span itemprop="com.example.size">12</span> players)</span></p>
-</div></pre>
-
- <p>The outer item here has two properties, "com.example.name" and
- "com.example.band". The "com.example.name" is "Amanda", and the
- "com.example.band" is an item in its own right, with two
- properties, "com.example.name" and "com.example.size". The
- "com.example.name" of the band is "Jazz Band", and the
- "com.example.size" is "12".</p>
-
- <p>The outer item in this example is a top-level microdata
- item.</p>
-
- </div>
-
- <p>Properties don't have to be given as descendants of the element
- with the <code title="attr-item">item</code> attribute. They can be
- associated with a specific <span title="concept-item">item</span>
- using the <code title="attr-subject">subject</code> attribute, which
- takes the ID of the element with the <code
- title="attr-item">item</code> attribute.</p>
-
- <div class="example">
-
- <p>This example is the same as the previous one, but all the
- properties are separated from their <span
- title="concept-item">items</span>:</p>
-
- <pre><div item id="amanda"></div>
-<p>Name: <span subject="amanda" itemprop="com.example.name">Amanda</span></p>
-<div subject="amanda" itemprop="com.example.band" item id="jazzband"></div>
-<p>Band: <span subject="jazzband" itemprop="com.example.name">Jazz Band</span></p>
-<p>Size: <span subject="jazzband" itemprop="com.example.size">12</span> players</p></pre>
-
- <p>This gives the same result as the previous example. The first
- item has two properties, "com.example.name", set to "Amanda", and
- "com.example.band", set to another item. That second item has two
- further properties, "com.example.name", set to "Jazz Band", and
- "com.example.size", set to "12".</p>
-
- </div>
-
- <p>An <span title="concept-item">item</span> can have multiple
- properties with the same name and different values.</p>
-
- <div class="example">
-
- <p>This example describes an ice cream, with two flavors:</p>
-
- <pre><div item>
- <p>Flavors in my favorite ice cream:</p>
- <ul>
- <li itemprop="com.example.flavor">Lemon sorbet</li>
- <li itemprop="com.example.flavor">Apricot sorbet</li>
- </ul>
-</div></pre>
-
- <p>This thus results in an item with two properties, both
- "com.example.flavor", having the values "Lemon sorbet" and "Apricot
- sorbet".</p>
-
- </div>
-
- <p>An element introducing a property can also introduce multiple
- properties at once, to avoid duplication when some of the properties
- have the same value.</p>
-
- <div class="example">
-
- <p>Here we see an item with two properties,
- "com.example.favorite-color" and "com.example.favorite-fruit", both
- set to the value "orange":</p>
-
- <pre><div item>
- <span itemprop="com.example.favorite-color com.example.favorite-fruit">orange</span>
-</div></pre>
-
- </div>
-
- <p>It's important to note that there is no relationship between the
- microdata and the content of the document where the microdata is
- marked up.</p>
-
- <div class="example">
-
- <p>There is no semantic difference, for instance, between the
- following two examples:</p>
-
- <pre><figure>
- <img src="castle.jpeg">
- <legend><span item><span itemprop="net.example.name">The Castle</span></span> (1986)</legend>
-</figure></pre>
-
- <pre><span item><meta itemprop="net.example.name" content="The Castle"></span>
-<figure>
- <img src="castle.jpeg">
- <legend>The Castle (1986)</legend>
-</figure></pre>
-
- <p>Both have a figure with a caption, and both, completely
- unrelated to the figure, have an item with a name-value pair with
- the name "net.example.name" and the value "The Castle". The only
- difference is that if the user drags the caption out of the
- document, in the former case, the item will be included in the
- drag-and-drop data. In neither case is the image in any way
- associated with the item.</p>
-
- </div>
-
-
- <h4>Typed items</h4>
-
- <p><i>This section is non-normative.</i></p>
-
- <p>The examples in the previous section show how information could
- be marked up on a page that doesn't expect its microdata to be
- re-used. Microdata is most useful, though, when it is used in
- contexts where other authors and readers are able to cooperate to
- make new uses of the markup.</p>
-
- <p>For this purpose, it is necessary to give each <span
- title="concept-item">item</span> a type, such as
- "com.example.person", or "com.example.cat", or
- "com.example.band". Types are identified in three ways:</p>
-
- <ul class="brief">
-
- <li>As <span title="URL">URLs</span>.
-
- <li>As <span title="valid reversed DNS identifier">reversed DNS
- labels</span>.
-
- <li>Using the names of <span title="predefined type">predefined
- types</span>, which are described below.
-
- </ul>
-
- <p><span title="URL">URLs</span> are self-explanatory. <span
- title="valid reversed DNS identifier">Reversed DNS labels</span> are
- strings such as "org.example.animals.cat" or "com.example.band".</p>
-
- <p>The type for an <span title="concept-item">item</span> is given
- as the value of the <code title="attr-item">item</code>
- attribute.</p>
-
- <p>When using custom typed items, the property names are also given
- in the form of <span title="URL">URLs</span> or <span title="valid
- reversed DNS identifier">reversed DNS labels</span>.</p>
-
- <div class="example">
-
- <p>Here, the item is "org.example.animals.cat":</p>
-
-<pre><section item="org.example.animal.cat">
- <h1 itemprop="org.example.name">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
- shorthair, with a fluffy black fur with white paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
-</section></pre>
-
- <p>In this example the "org.example.animals.cat" item has three
- properties, an "org.example.name" ("Hedral"), an "org.example.desc"
- ("Hedral is..."), and an "org.example.img" ("hedral.jpeg").</p>
-
- </div>
-
- <p>An item can have several types, in the same way that an element
- can declare several properties at once.</p>
-
- <div class="example">
-
- <p>Here, the item is both an "org.example.animals.cat" and a "com.example.feline":</p>
-
-<pre><section item="org.example.animal.cat com.example.feline">
- <h1 itemprop="org.example.name com.example.fn">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
- shorthair, with a fluffy <span
- itemprop="com.example.color">black</span> fur with <span
- itemprop="com.example.color">white</span> paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
-</section></pre>
-
- <p>This example has one item with two types and the following
- properties:</p>
-
- <table>
- <thead>
- <tr>
- <td>Property
- <td>Value
- <tbody>
- <tr>
- <td>org.example.name
- <td>Hedral
- <tr>
- <td>com.example.fn
- <td>Hedral
- <tr>
- <td>org.example.desc
- <td>Hedral is a male american domestic shorthair, with a fluffy black fur with white paws and belly.
- <tr>
- <td>com.example.color
- <td>black
- <tr>
- <td>com.example.color
- <td>white
- <tr>
- <td>org.example.img
- <td>.../hedral.jpeg
- </table>
-
- </div>
-
-
-
- <h4>Selecting names when defining vocabularies</h4>
-
- <p><i>This section is non-normative.</i></p>
-
- <p>Using microdata means using a vocabulary. For some purposes, an
- ad-hoc vocabulary is adequate. For others, a vocabulary will need to
- be designed. Where possible, authors are encouraged to re-use
- existing vocabularies, as this makes content re-use easier.</p>
-
- <p>When designing new vocabularies, identifiers can be created
- either using <span title="URL">URLs</span> or <span title="valid
- reversed DNS identifier">reversed DNS labels</span>. For URLs
- conflicts with other vocabularies can be avoided by only using
- identifiers that correspond to pages that the author has control
- over. Similarly, for reversed DNS labels conflicts can be avoided by
- using a domain name that the author has control over, or by using
- suffixes that correspond to the path components of pages that the
- author has control over.</p>
-
- <div class="example">
-
- <p>For instance, if Jon and Adam both write content at <code
- title="">example.com</code>, at <code
- title="">http://example.com/jon/...</code> and <code
- title="">http://example.com/adam/...</code> respectively, then they
- could select identifiers of the form "com.example.jon.name" and
- "com.example.adam.name" respectively.</p>
-
- </div>
-
-
- <h4>Predefined vocabularies</h4>
-
- <p><i>This section is non-normative.</i></p>
-
- <p>To make the most common tasks simpler, certain vocabularies have
- been predefined. These use short names for types and properties.</p>
-
- <div class="example">
-
- <p>For example, the <span title="md-vcard">vCard</span> vocabulary
- can be used to mark up people's names:</p>
-
- <pre><span item=vcard><span itemprop=fn>George Washington</span></span></pre>
-
- <p>This creates a single item with a single name-value pair, with
- the name "fn" and the value "George Washington". This is defined to
- map to the following vCard:</p>
-
- <pre>BEGIN:VCARD
-PROFILE:VCARD
-VERSION:3.0
-SOURCE:<var title="">document's address</var>
-FN:George Washington
-N:Washington;George;;;
-END:VCARD</pre>
-
- </div>
-
-
- <h4>Using the microdata DOM API</h4>
-
- <p><i>This section is non-normative.</i></p>
-
- <p>The microdata becomes even more useful when scripts can use it to
- expose information to the user, for example offering it in a form
- that can be used by other applications.</p>
-
- <p>The <code title="dom-document-getItems">document.getItems(<var
- title="">typeNames</var>)</code> method provides access to the
- <span>top-level microdata items</span>. It returns a
- <code>NodeList</code> containing the items with the specified types,
- or all types if no argument is specified.</p>
-
- <p>Each <span title="concept-item">item</span> is represented in the
- DOM by the element on which the relevant <code
- title="attr-item">item</code> attribute is found. The various types
- that the element has can be obtained using the <code
- title="dom-item">element.item</code> DOM attribute, which returns a
- <code>DOMSettableTokenList</code> object.</p>
-
- <div class="example">
-
- <p>This sample how the <code
- title="dom-document-getItems">getItems()</code> method can be used
- to obtain a list of all the top-level microdata items of one type
- given in the document:</p>
-
- <pre>var cats = document.getItems("com.example.feline");</pre>
-
- </div>
-
- <p>Once an element representing an <span
- title="concept-item">item</span> has been obtained, its properties
- can be extracted using the <code
- title="dom-properties">properties</code> DOM attribute. This
- attribute returns an <code>HTMLPropertyCollection</code>, which can
- be enumerated to go through each element that adds one or more
- properties to the item. It can also be indexed by name, which will
- return an object with a list of the elements that add properties
- with that name.</p>
-
- <p>Each element that adds a property also has a <code
- title="dom-content">content</code> DOM attribute that returns its
- value.
-
- <div class="example">
-
- <p>This sample gets the first item of type "net.example.user" and
- then pops up an alert using the "net.example.name" property from
- that item.</p>
-
- <pre>var user = document.getItems('net.example.user')[0];
-alert('Hello ' + user.properties['net.example.name'][0].content + '!');</pre>
-
- </div>
-
- <p>The <code>HTMLPropertyCollection</code> object, when indexed by
- name in this way, actually returns a <code>PropertyNodeList</code>
- object with all the matching properties. The
- <code>PropertyNodeList</code> object can be used to obtained all the
- values at once using <em>its</em> <code
- title="dom-PropertyNodeList-contents">contents</code> attribute,
- which returns an array of all the values.</p>
-
- <div class="example">
-
- <p>In an earlier example, a "com.example.feline" item had two
- "com.example.color" values. This script looks up the first such
- item and then lists all its values.</p>
-
- <pre>var cat = document.getItems('com.example.feline')[0];
-var colors = cat.properties['com.example.color'].contents;
-var result;
-if (colors.length == 0) {
- result = 'Color unknown.';
-} else if (colors.length == 1) {
- result = 'Color: ' + colors[0];
-} else {
- result = 'Colors:';
- for (var i = 0; i < colors.length; i += 1)
- result += ' ' + colors[i];
-}</pre>
-
- </div>
-
- <p>It's also possible to get a list of all the <span>property
- names</span> using the object's <code
- title="dom-HTMLPropertyCollection-names">names</code> DOM
- attribute.</p>
-
- <div class="example">
-
- <p>This example creates a big list with a nested list for each item
- on the page, each with of all the property names used in that
- item.</p>
-
- <pre>var outer = document.createElement('ul');
-for (var item = 0; item < document.items.length; item += 1) {
- var itemLi = document.createElement('li');
- var inner = document.createElement('ul');
- for (var name = 0; name < document.items[item].names.length; name += 1) {
- var propLi = document.createElement('li');
- propLi.appendChild(document.createTextNode(document.items[item].names[name]));
- inner.appendChild(propLi);
- }
- itemLi.appendChild(inner);
- outer.appendChild(itemLi);
-}
-document.body.appendChild(outer);</pre>
-
- <p>If faced with the following from an earlier example:</p>
-
- <pre><section item="org.example.animal.cat com.example.feline">
- <h1 itemprop="org.example.name com.example.fn">Hedral</h1>
- <p itemprop="org.example.desc">Hedral is a male american domestic
- shorthair, with a fluffy <span
- itemprop="com.example.color">black</span> fur with <span
- itemprop="com.example.color">white</span> paws and belly.</p>
- <img itemprop="org.example.img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
-</section></pre>
-
- <p>...it would result in the following output:</p>
-
- <ul>
- <li>
- <ul>
- <li>org.example.name</li>
- <li>com.example.fn</li>
- <li>org.example.desc</li>
- <li>com.example.color</li>
- <li>org.example.img</li>
- </ul>
- </li>
- </ul>
-
- <p>(The duplicate occurrence of "com.example.color" is not included
- in the list.)</p>
-
- </div>
-
-
-
- <h3>Encoding microdata</h3>
-
- <h4>The microdata model</h4>
-
- <p>The microdata model consists of groups of name-value pairs known
- as <dfn title="concept-item">items</dfn>.</p>
-
- <p>Each group has zero or more types, each name has one or more
- values, and each value is either a string or another group of
- name-value pairs.</p>
-
-
- <h4>Items: the <dfn title="attr-item"><code>item</code></dfn> attribute</h4>
-
- <p>Every <span title="HTML elements">HTML element</span> may have an
- <code title="attr-item">item</code> attribute specified.</p>
-
- <p>An element with the <code title="attr-item">item</code> attribute
- specified creates a new <span title="concept-item">item</span>, a
- group of name-value pairs.</p>
-
- <p>The attribute, if specified, must have a value that is an
- <span>unordered set of unique space-separated tokens</span>
- representing the types (if any) of the <span
- title="concept-item">item</span>.</p>
-
- <p>Each token must be either:</p>
-
- <ul>
-
- <li>A <span>valid URL</span> that is an <span>absolute URL</span>
- for which the string "<code
- title="">http://www.w3.org/1999/xhtml/custom#</code>" is not a
- <span>prefix match</span>, or</li>
-
- <li>A <span>valid reversed DNS identifier</span>, or</li>
-
- <li>A <span>predefined type</span>.</li>
-
- </ul>
-
- <p>If any of the tokens are a <span>predefined type</span>, then
- there must not be any other tokens that are <span title="predefined
- type">predefined types</span>.</p>
-
- <p>The <dfn>item types</dfn> of an element with an <code
- title="attr-item">item</code> attribute are the tokens that the
- element's <code title="attr-item">item</code> attribute is found to
- contain when its value is <span title="split a string on
- spaces">split on spaces</span>.</p>
-
-
- <h4>Associating names with items</h4>
-
- <p>The <dfn title="attr-subject"><code>subject</code></dfn>
- attribute may be specified on any <span title="HTML elements">HTML
- element</span> to associate the element with an element with an
- <code title="attr-item">item</code> attribute. If the <code
- title="attr-subject">subject</code> attribute is specified, the
- attribute's value must be the ID of an element with an <code
- title="attr-item">item</code> attribute, in the same
- <code>Document</code> as the element with the <code
- title="attr-subject">subject</code> attribute.</p>
-
- <p>An element's <dfn
- title="concept-item-corresponding">corresponding item</dfn> is
- determined by its position in the DOM and by any <code
- title="attr-subject">subject</code> attributes on the element, and
- is defined as follows:</p>
-
- <dl>
-
- <dt>If the element has a <code title="attr-subject">subject</code>
- attribute</dt>
-
- <dd><p>If there is an element in the document with an ID equal to
- the value of the <code title="attr-subject">subject</code>
- attribute, and if the first such element has an <code
- title="attr-item">item</code> attribute specified, then that
- element is the <span
- title="concept-item-corresponding">corresponding
- item</span>. Otherwise, there is no <span
- title="concept-item-corresponding">corresponding
- item</span>.</p></dd>
-
- <dt>If the element has no <code title="attr-subject">subject</code>
- attribute but does have an ancestor with an <code
- title="attr-item">item</code> attribute specified</dt>
-
- <dd><p>The nearest ancestor element with the <code
- title="attr-item">item</code> attribute specified is the element's
- <span title="concept-item-corresponding">corresponding
- item</span>.</p></dd>
-
- <dt>If the element has neither <code
- title="attr-subject">subject</code> attribute nor an ancestor with
- an <code title="attr-item">item</code> attribute specified</dt>
-
- <dd><p>The element has no <span
- title="concept-item-corresponding">corresponding
- item</span>.</p></dd>
-
- </dl>
-
- <p>The list of elements that create <span
- title="concept-item">items</span> but do not themselves have a <span
- title="concept-item-corresponding">corresponding item</span> forms
- the list of <dfn>top-level microdata items</dfn>.</p>
-
-
- <h4>Names: the <dfn title="attr-itemprop"><code>itemprop</code></dfn> attribute</h4>
-
- <p>Every <span title="HTML elements">HTML element</span> that has a
- <span title="concept-item-corresponding">corresponding item</span>
- may have an <code title="attr-itemprop">itemprop</code> attribute
- specified.</p>
-
- <p>An element with the <code title="attr-itemprop">itemprop</code>
- attribute specified adds one or more name-value pairs to its
- <span title="concept-item-corresponding">corresponding item</span>.</p>
-
- <p>The <code title="attr-itemprop">itemprop</code> attribute, if
- specified, must have a value that is an <span>unordered set of
- unique space-separated tokens</span> representing the names of the
- name-value pairs that it adds. The attribute's value must have at
- least one token.</p>
-
- <p>Each token must be either:</p>
-
- <ul>
-
- <li>A <span>valid URL</span> that is an <span>absolute URL</span>
- for which the string "<code
- title="">http://www.w3.org/1999/xhtml/custom#</code>" is not a
- <span>prefix match</span>, or</li>
-
- <li>A <span>valid reversed DNS identifier</span>, or</li>
-
- <li>A <span>predefined property name</span> allowed in this situation.</li>
-
- </ul>
-
- <p>The <dfn>property names</dfn> of an element are the tokens that
- the element's <code title="attr-itemprop">itemprop</code> attribute
- is found to contain when its value is <span title="split a string on
- spaces">split on spaces</span>, with the order preserved but with
- duplicates removed (leaving only the first occurrence of each
- name).</p>
-
- <p>With an <span title="concept-item">item</span>, the properties
- are unordered with respect to each other, except for properties with
- the same name, which are ordered in <span>tree order</span>.</p>
-
- <div class="example">
-
- <p>In the following example, the "a" property has the values "1"
- and "2", <em>in that order</em>, but whether the "a" property comes
- before the "b" property or not is not important:</p>
-
- <pre><div item>
- <p itemprop="a">1</p>
- <p itemprop="a">2</p>
- <p itemprop="b">test</p>
-</div></pre>
-
- <p>Thus, the following is equivalent:</p>
-
- <pre><div item>
- <p itemprop="b">test</p>
- <p itemprop="a">1</p>
- <p itemprop="a">2</p>
-</div></pre>
-
- <p>As is the following:</p>
-
- <pre><div item>
- <p itemprop="a">1</p>
- <p itemprop="b">test</p>
- <p itemprop="a">2</p>
-</div></pre>
-
- </div>
-
-
- <h4>Values</h4>
-
- <p>The <dfn title="concept-property-value">property value</dfn> of a
- name-value pair added by an element with an <code
- title="attr-itemprop">itemprop</code> attribute depends on the
- element, as follows:</p>
-
- <dl>
-
- <dt>If the element also has an <code title="attr-item">item</code>
- attribute</dt>
-
- <dd><p>The value is the <span title="concept-item">item</span>
- created by the element.</p></dd>
-
-
- <dt>If the element is a <code>meta</code> element</dt>
-
- <dd><p>The value is the value of the element's <code
- title="attr-content">content</code> attribute, if any, or the empty
- string if there is no such attribute.</p></dd>
-
-
- <dt>If the element is an <code>audio</code>, <code>embed</code>,
- <code>iframe</code>, <code>img</code>, <code>source</code>, or
- <code>video</code> element</dt>
-
- <dd><p>The value is the <span>absolute URL</span> that results from
- <span title="resolve a url">resolving</span> the value of the
- element's <code title="">src</code> attribute relative to the
- element at the time the attribute is set, or the empty string if
- there is no such attribute or if <span title="resolve a
- url">resolving</span> it results in an error.</p></dd>
-
-
- <dt>If the element is an <code>a</code>, <code>area</code>, or
- <code>link</code> element</dt>
-
- <dd><p>The value is the <span>absolute URL</span> that results from
- <span title="resolve a url">resolving</span> the value of the
- element's <code title="">href</code> attribute relative to the
- element at the time the attribute is set, or the empty string if
- there is no such attribute or if <span title="resolve a
- url">resolving</span> it results in an error.</p></dd>
-
-
- <dt>If the element is an <code>object</code> element</dt>
-
- <dd><p>The value is the <span>absolute URL</span> that results from
- <span title="resolve a url">resolving</span> the value of the
- element's <code title="">data</code> attribute relative to the
- element at the time the attribute is set, or the empty string if
- there is no such attribute or if <span title="resolve a
- url">resolving</span> it results in an error.</p></dd>
-
-
- <dt>If the element is a <code>time</code> element with a <code
- title="attr-datetime">datetime</code> attribute</dt>
-
- <dd><p>The value is the value of the element's <code
- title="attr-datetime">datetime</code> attribute.</p></dd>
-
-
- <dt>Otherwise</dt>
-
- <dd><p>The value is the element's
- <code>textContent</code>.</p></dd>
-
- </dl>
-
- <p>The <dfn>URL property elements</dfn> are the <code>a</code>,
- <code>area</code>, <code>audio</code>, <code>embed</code>,
- <code>iframe</code>, <code>img</code>, <code>link</code>,
- <code>object</code>, <code>source</code>, and <code>video</code>
- elements.</p>
-
- <p>If a property's <span title="concept-property-value">value</span>
- is an <span>absolute URL</span>, the property must be specified
- using an <span title="URL property elements">URL property
- element</span>.</p>
-
-
-
- <h3>Microdata DOM API</h3>
-
- <dl class="domintro">
-
- <dt><var title="">document</var> . <code title="dom-getItems()">getItems</code>( [ <var title="">types</var> ] )</dt>
-
- <dd>
-
- <p>Returns a <code>NodeList</code> of the elements in the <code>Document</code> that create <span title="concept-item">items</span>, that are not part of other <span title="concept-item">items</span>, and that have all the types given in the argument, if any.</p>
-
- <p>The <var title="">types</var> argument is interpreted as a space-separated list of classes.</p>
-
- </dd>
-
- <dt><var title="">element</var> . <code title="dom-properties">properties</code></dt>
-
- <dd>
-
- <p>If the element has an <code title="attr-item">item</code>
- attribute, returns an <code>HTMLPropertyCollection</code> object
- with all the element's properties. Otherwise, an empty
- <code>HTMLPropertyCollection</code> object.</p>
-
- </dd>
-
- <dt><var title="">element</var> . <code title="dom-content">content</code> [ = <var title="">value</var> ]</dt>
-
- <dd>
-
- <p>Returns the element's <span
- title="concept-property-value">value</span>.</p>
-
- <p>Can be set, to change the element's <span
- title="concept-property-value">value</span>.</p>
-
- </dd>
-
- </dl>
-
- <div class="impl">
-
- <p>The <dfn
- title="dom-document-getItems"><code>document.getItems(<var
- title="">typeNames</var>)</code></dfn> method takes an optional
- string that contains an <span>unordered set of unique
- space-separated tokens</span> representing types. When called, the
- method must return a live <code>NodeList</code> object containing
- all the elements in the document, in <span>tree order</span>, that
- are <span>top-level microdata items</span> that have all the <span
- title="item types">types</span> specified in that argument, having
- obtained the types by <span title="split a string on
- spaces">splitting a string on spaces</span>. 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
- <span>top-level microdata items</span> in the document.</p>
-
- <p>The <dfn title="dom-item"><code>item</code></dfn> DOM attribute
- on elements must <span>reflect</span> the element's <code
- title="attr-item">item</code> content attribute.</p>
-
- <p>The <dfn title="dom-itemprop"><code>itemprop</code></dfn> DOM
- attribute on elements must <span>reflect</span> the element's <code
- title="attr-itemprop">itemprop</code> content attribute.</p>
-
- <p>The <dfn title="dom-properties"><code>properties</code></dfn> DOM
- attribute on elements must return an
- <code>HTMLPropertyCollection</code> rooted at the
- <code>Document</code> node, whose filter matches only elements that
- have <span>property names</span> and have a <span
- title="concept-item-corresponding">corresponding item</span> that is
- equal to the element on which the attribute was invoked.</p>
-
- <p>The <dfn title="dom-content"><code>content</code></dfn> DOM
- attribute's behavior depends on the element, as follows:</p>
-
- <dl>
-
- <dt>If the element is a <code>meta</code> element</dt>
-
- <dd><p>The attribute must act as it would if it was <span
- title="reflect">reflecting</span> the element's <code
- title="attr-meta-content">content</code> content
- attribute.</p></dd>
-
-
- <dt>If the element is an <code>audio</code>, <code>embed</code>,
- <code>iframe</code>, <code>img</code>, <code>source</code>, or
- <code>video</code> element</dt>
-
- <dd><p>The attribute must act as it would if it was <span
- title="reflect">reflecting</span> the element's <code
- title="">src</code> content attribute.</p></dd>
-
-
- <dt>If the element is an <code>a</code>, <code>area</code>, or
- <code>link</code> element</dt>
-
- <dd><p>The attribute must act as it would if it was <span
- title="reflect">reflecting</span> the element's <code
- title="">href</code> content attribute.</p></dd>
-
-
- <dt>If the element is an <code>object</code> element</dt>
-
- <dd><p>The attribute must act as it would if it was <span
- title="reflect">reflecting</span> the element's <code
- title="">data</code> content attribute.</p></dd>
-
-
- <dt>If the element is a <code>time</code> element with a <code
- title="attr-datetime">datetime</code> attribute</dt>
-
- <dd><p>The attribute must act as it would if it was <span
- title="reflect">reflecting</span> the element's <code
- title="">datetime</code> content attribute.</p></dd>
-
-
- <dt>Otherwise</dt>
-
- <dd><p>The attribute must act the same as the element's
- <code>textContent</code> attribute.</p></dd>
-
- </dl>
-
- <p>The <dfn title="dom-subject"><code>subject</code></dfn> DOM
- attribute on elements must <span>reflect</span> the element's <code
- title="attr-subject">subject</code> content attribute.</p>
-
- </div>
-
-<!--END microdata1--><!--END html5-->
-<!--START microdata2-->
-
- <h4>The basic syntax</h4>
-
- <p><i>This section is non-normative.</i></p>
-
- <p>At a high level, microdata consists of a group of name-value
- pairs. The groups are called <span
- title="concept-item">items</span>, and each name-value pair is a
- property. Items and properties are represented by regular
- elements.</p>
-
- <p>To create an item, the <code title="attr-item">item</code>
- attribute is used.</p>
-
- <p>To add a property to an item, the <code
- title="attr-itemprop">itemprop</code> attribute is used on one of
- the <span title="concept-item">item's</span> descendants.</p>
-
- <div class="example">
-
<p>Here there are two items, each of which have the property "name":</p>
<pre><div item>
@@ -48714,13 +47805,14 @@
space-separated tokens</span> representing types. When called, the
method must return a live <code>NodeList</code> object containing
all the elements in the document, in <span>tree order</span>, that
- are <span>top-level microdata items</span> whose <span title="item
- types">types</span> are one of the types specified in that argument,
- having obtained the types by <span title="split a string on
- spaces">splitting the string on spaces</span>. 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 <span>top-level microdata items</span> in the document.</p>
+ are each <span>top-level microdata items</span> with a <span
+ title="item type">type</span> equal to one of the types specified in
+ that argument, having obtained the types by <span title="split a
+ string on spaces">splitting the string on spaces</span>. 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 <span>top-level microdata items</span> in the
+ document.</p>
<p>The <dfn title="dom-item"><code>item</code></dfn> DOM attribute
on elements must <span>reflect</span> the element's <code
@@ -48796,6 +47888,8 @@
</div>
+<!--END microdata1--><!--END html5-->
+<!--START microdata2-->
<!--END microdata2-->
<!--START microdata3-->
<!--END microdata3-->
@@ -48807,16 +47901,19 @@
<p>A number of <dfn title="predefined type">predefined types</dfn>
exist, for describing common structures. Each such type has a set of
<dfn title="predefined property name">predefined property
- names</dfn> that are used to describe data of that type.</p>
+ names</dfn> that are used to describe data of that type. In
+ addition, there are some <dfn title="predefined global property
+ name">predefined global property names</dfn> that can be used for
+ any item.</p>
<h4>General</h4>
- <p>The <dfn title="md-about"><code>about</code></dfn> property can
- be used to name an <span title="concept-item">item</span> for the
- purposes of identifying or refering to the data defined in that
- item.</p>
+ <p>The <span>predefined global property name</span> <dfn
+ title="md-about"><code>about</code></dfn> can be used to name an
+ <span title="concept-item">item</span> for the purposes of
+ identifying or refering to the data defined in that item.</p>
<p>A single property with the name <code
title="md-about">about</code> may be present within each <span
@@ -51187,15 +50284,9 @@
<li><p>Let <var title="">result</var> be an empty object.</p></li>
- <li><p>Let <var title="">types</var> be an empty array.</p></li>
-
- <li><p>For each <span title="item types">item type</span> <var
- title="">type</var> of <var title="">item</var>, append <var
- title="">type</var> to <var title="">types</var>.</p></li>
-
<li><p>Add an entry to <var title="">result</var> called "<code
- title="">type</code>" whose value is the array <var
- title="">types</var>.</p></li>
+ title="">type</code>" whose value is the <span>item type</span> of
+ <var title="">item</var>.</p></li>
<li><p>Let <var title="">properties</var> be an empty
object.</p></li>
@@ -51433,43 +50524,32 @@
property. Otherwise, let <var title="">subject</var> be a new blank
node.</p></li>
- <li><p>Let <var title="">is-work</var> be false.</p></li>
+ <li><p>Let <var title="">type</var> be the <span>item type</span>
+ of <var title="">item</var>.</p></li>
<li>
- <p>For each <span title="item types">item type</span> <var
- title="">type</var> of <var title="">item</var>, run the following
- substeps:</p>
+ <p>If <var title="">type</var> is neither the empty string nor an
+ <span>absolute URL</span>, then let <var title="">type</var> be
+ the result of concatenating the string "<code
+ title="">http://www.w3.org/1999/xhtml/custom#</code>" with the
+ <var title="">type</var>, with any characters in <var
+ title="">type</var> that are not valid in the <ifragment>
+ production of the IRI syntax being %-escaped.</p>
- <ol>
+ </li>
- <li><p>If <var title="">type</var> is <code
- title="md-work">work</code>, let <var title="">is-work</var> be
- true.</p></li>
+ <li>
- <li><p>If <var title="">type</var> is not an <span>absolute
- URL</span>, then let <var title="">type</var> be the result of
- concatenating the string "<code
- title="">http://www.w3.org/1999/xhtml/custom#</code>" with <var
- title="">type</var>, with any characters in <var
- title="">type</var> that are not valid in the <ifragment>
- production of the IRI syntax being %-escaped. <a
- href="#refsRFC3987">[RFC3987]</a></p></li>
+ <p>If <var title="">type</var> is not the empty string, generate
+ the following triple:</p>
- <li>
+ <dl class="triple">
+ <dt>subject <dd> <var title="">subject</var>
+ <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
+ <dt>object <dd> <var title="">type</var>
+ </dl>
- <p>Generate the following triple:</p>
-
- <dl class="triple">
- <dt>subject <dd> <var title="">subject</var>
- <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
- <dt>object <dd> <var title="">type</var>
- </dl>
-
- </li>
-
- </ol>
-
</li>
<li>
@@ -51512,20 +50592,22 @@
<li><p>If <var title="">name</var> is equal to the string
"<code title="md-about">about</code>", skip this name.</p></li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and <var
- title="">name</var> is equal to the string "<code
- title="md-work-title">title</code>", let <var
- title="">name</var> be the string "<code
+ <li><p>Otherwise, if <var title="">type</var> is <code
+ title="md-work">work</code>, and <var title="">name</var> is
+ equal to the string "<code title="md-work-title">title</code>",
+ let <var title="">name</var> be the string "<code
title="">http://purl.org/dc/elements/1.1/title</code>".</p></li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and <var
- title="">name</var> is equal to the string "<code
+ <li><p>Otherwise, if <var title="">type</var> is <code
+ title="md-work">work</code>, and <var title="">name</var> is
+ equal to the string "<code
title="md-work-author">author</code>", let <var
title="">name</var> be the string "<code
title="">http://creativecommons.org/ns#attributionName</code>".</p></li>
- <li><p>Otherwise, if <var title="">is-work</var> is true, and
- <var title="">name</var> is equal to the string "<code
+ <li><p>Otherwise, if <var title="">type</var> is <code
+ title="md-work">work</code>, and <var title="">name</var> is
+ equal to the string "<code
title="md-work-license">license</code>", let <var
title="">name</var> be the string "<code
title="">http://www.w3.org/1999/xhtml/vocab#license</code>".</p></li>
More information about the Commit-Watchers
mailing list