--- a/microdata-rdf/index.html Sat Nov 05 13:55:15 2011 -0700
+++ b/microdata-rdf/index.html Tue Nov 15 19:01:34 2011 -0800
@@ -278,27 +278,51 @@
</div>
<section class="informative">
<h2>Background</h2>
- <p>Microdata is a way of expressing metadata in HTML documents using attributes. A previous version
- of microdata [[!MICRODATA]] included rules for generating RDF, but current Editor's Drafts have removed
- the explicit transformation procedure. Microdata is now used as an API to access data from within
- an HTML DOM and as a JSON serialization.</p>
- <p>The original RDF transformation process created URIs for properties that are expressed as non-absolute
- URIs. The algorithm was designed to create URIs which were distinct based on the relationship between
- <aref>itemtype</aref> and <aref>itemprop</aref> contexts. This is required, as the microdata data model
- requires that properties maintain distinct semantic meanings in different contexts. However, this
- form of URI generation is typically different than that used within RDF vocabularies, where
- properties typically have a common meaning within a given <tref>vocabulary</tref>.</p>
- <p>Microdata also specifies that items are values are ordered, which is not typically the case for RDF
- vocabularies. In fact, unless a property has an <code>rdfs:range</code> of <code>rdf:List</code>, or is
- unspecified, it may not be appropriate to generate an <tref>RDF Collection</tref>.</p>
- <p>This specification is an update to the original RDF transformation process in addition to
- <tref>vocabulary</tref>-specific rules that affect the generation of property URIs and value serializations.
- This is facilitated by a <tref>registry</tref> that associates URIs with specific rules based on matching
- <aref>itemtype</aref> values against registered URI prefixes do determine a vocabulary and
- vocabulary-specific processing rules.</p>
- <p class="note">The Microdata JSON serialization does not retain <em>datatype</em> or
- <em>language</em> information that might be derived from the HTML DOM. The RDF Transformation does retain language
- information when it is available.</p>
+ <p>Microdata [[!MICRODATA]] is a way of embedding data in HTML documents
+ using attributes. The HTML DOM is extended to provide an API for
+ accessing microdata information, and the microdata specification
+ defines how to generate a JSON representation from microdata markup.</p>
+
+ <p>Mapping microdata to RDF enables consumers to merge data expressed
+ in other RDF-based formats with microdata. It facilitates the use of
+ RDF vocabularies within microdata, and enables microdata to be used
+ with the full RDF toolchain. Some use cases for this mapping are
+ described in <a href="use-cases">Section 1.2</a> below.</p>
+
+ <p>Microdata's data model does not align neatly with RDF.</p>
+ <ul>
+ <li>Non-URL microdata properties are disambiguated based on microdata
+ <tref>item</tref> type; an item with the type <code>http://example.org/Cat</code> can have
+ both the property <code>color</code> and the property <code>http://example.org/color</code>,
+ and these properties are semantically distinct under microdata. In
+ RDF, all properties have IRIs.</li>
+
+ <li>When a microdata property has multiple values, those values are
+ always ordered; in RDF, property values are unordered unless they
+ are explicitly listed in an <tref>RDF Collection</tref>.</li>
+
+ <li>A value in microdata is always a simple string which is interpreted
+ by the consuming application. In RDF, values can be tagged with a
+ datatype or a language. According to the microdata specification, the
+ HTML context of microdata markup should not change how microdata is
+ interpreted, so although element names and HTML lang attributes could
+ be used to provide datatype and language information for RDF data, this
+ would be contrary to the microdata specification.</li>
+ </ul>
+
+ <p>Thus, in some places the needs of RDF consumers violate requirements of
+ the microdata specification. This specification highlights where such
+ violations occur and the reasons for them.</p>
+
+ <p>This specification allows for
+ <tref>vocabulary</tref>-specific rules that affect the generation of property URIs and value serializations.
+ This is facilitated by a <tref>registry</tref> that associates URIs with specific rules based on matching
+ <aref>itemtype</aref> values against registered URI prefixes do determine a vocabulary and potentially
+ vocabulary-specific processing rules.</p>
+
+ <p>This specification also assumes that consumers of RDF generated from
+ microdata may have to process the results in order to, for example,
+ assign appropriate datatypes to property values.</p>
</section>
<section class="informative">
@@ -319,11 +343,14 @@
RDF that is appropriate for their known <tref>vocabulary</tref>.</li>
<li>A browser plugin that captures data for the user uses an RDF model as its backend store.
Any time it encounters microdata on a page, it wants to pull that microdata into the store on the fly.</li>
- <li><a href="http://purl.org/goodrelations/">GoodRelations</a> require properties to be generated
- in a flat namespace, not place multiple values within a container. Ideally, a processor would make use
- of<code>rdfs:range</code> declarations at parse time so properly typed literals could be constructed. It also
- requires that plain literals retain language information in scope on the HTML element, as it is common that
- multiple values will be used to specify the same information in different languages. Collection.</li>
+ <li><a href="http://purl.org/goodrelations/">GoodRelations</a> properties do not take
+ <a href="#rdf-collection">rdf:List</a> values; when they take
+ multiple values they are unordered. The <code>rdfs:range</code> of a GoodRelations
+ property indicates the datatype of the expected value, and GoodRelations
+ processors will expect values to be cast to that type. Language
+ information from the HTML needs to be captured as it is common that
+ multiple values will be used to specify the same information in different
+ languages.</li>
<li><a href="http://schema.org/">Schema.org</a> has an
<a href="http://schema.org/docs/extension.html">extension mechanism</a> to allow authors to express information
that is more detail than the pre-defined types, properties and enumerations. Property URIs are all in the same
@@ -353,10 +380,7 @@
Should the <tref>registry</tref> allow a property name or URI to be used as an alias for <aref>itemid</aref>.
</dd>
</dl>
-</section>
-<section class="informative">
- <h2>Goals</h2>
<p>The purpose of this specification is to provide input to a future working group that can make decisions
about the need for a <tref>registry</tref> and the details of processing. Among the options investigated by
the Task Force are the following:</p>
@@ -369,7 +393,7 @@
parallel to the type URI.</li>
<li>Type-based URI generation, where the URI of the in-scope <aref>itemtype</aref> forms the base of property URI
by adding the property to the type URI as a fragment.</li>
- <li>When there are multiple top-level items in a document, place items in an RDF Collection.
+ <li>When there are multiple <tref>top-level item</tref>s in a document, place items in an RDF Collection.
Alternatively, simply list the items as multiple values, or do not generate an
<code>http://www.w3.org/ns/md#item</code> mapping at all.</li>
<li>When there are multiple values for an <aref>itemprop</aref>, place items in an RDF Collection.
@@ -383,73 +407,76 @@
<h1>Attributes and Syntax</h1>
<p>
The microdata specification [[!MICRODATA]] defines a number of attributes and the way in which those
- attributes are to be interpreted. This section describes those attributes, with reference to their
- original definition.
- </p>
+ attributes are to be interpreted. The
+ <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">microdata DOM API</a></cite>
+ provides methods and attributes for retrieving microdata from the HTML DOM without regards to specific elements
+ or attributes and conforming implementations MAY generate RDF using only this API.
+ <p>For reference, attributes used for specifying and retrieving HTML microdata are referenced here:</p>
<dl>
<dt><adef>content</adef></dt><dd>
- An attribute appropriate for use with the <code>meta</code> element for creating invisible properties.
+ An attribute appropriate for use with the <code>meta</code> element used to create an <tref>plain literal</tref>
+ value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>.
</dd>
<dt><adef>data</adef></dt><dd>
- An attribute appropriate for use with the <code>object</code> element for creating URI<tref>URI
- reference</tref>s.
+ An attribute appropriate for use with the <code>object</code> element used to create a <tref>URI
+ reference</tref> value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>.
</dd>
<dt><adef>datetime</adef></dt><dd>
- An attribute appropriate for use with the <code>date</code> element for creating typed literals.
+ An attribute appropriate for use with the <code>time</code> element used to create an <tref>typed literal</tref>
+ value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>
+ with a datatype depending on its syntax.
</dd>
<dt><adef>href</adef></dt><dd>
- An attribute appropriate for use with <code>a</code>, <code>area</code> or <code>link</code> elements for
- creating <tref>URI reference</tref>s.
+ An attribute appropriate for use with <code>a</code>, <code>area</code> or <code>link</code> elements used to create a
+ <tref>URI reference</tref> value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>.
</dd>
<dt><adef>itemid</adef></dt><dd>
An attribute containing a URI used to identify the subject of triples associated with this <tref>item</tref>.
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.itemId</code>.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite> in [[!MICRODATA]]).
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemid">Items</a></cite>
+ in [[!MICRODATA]]).
</dd>
<dt><adef>itemprop</adef></dt><dd>
An attribute used to identify one or more properties to one ore more <tref>item</tref>s. An <aref>itemprop</aref>
contains a space separated list of <tdef>name</tdef>s which may either by <tref>absolute URI</tref>s or terms
associated with the type of the <tref>item</tref> as defined by the referencing <trdf>item</trdf>'s
<aref>itemtype</aref>.
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.itemProp</code>.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#names:-the-itemprop-attribute">Section 3.3
- Names: the itemprop attribute</a></cite> of [[!MICRODATA]]).
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemprop">Items</a></cite>
+ in [[!MICRODATA]]).
</dd>
<dt><adef>itemref</adef></dt><dd>
- An additional attribute on an <tref>item</tref> that references additional elements containing property
- definitions to be applied to the referencing <tref>item</tref>. The attribute value is an unordered
- list of ID references to elements within the same document.
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.itemRef</code>.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite>
- of [[!MICRODATA]]).
+ An additional attribute on an element that references additional elements containing property
+ definitions to be applied to the referencing <tref>item</tref>.
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemref">Items</a></cite>
+ in [[!MICRODATA]]).
</dd>
<dt><adef>itemscope</adef></dt><dd>
- An boolean attribute identifying an element as an item.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite>
- of [[!MICRODATA]]).
+ An boolean attribute identifying an element as an <tref>item</tref>.
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Items</a></cite>
+ in [[!MICRODATA]]).
</dd>
<dt><adef>itemtype</adef></dt><dd>
- An additional attribute on an <tref>item</tref> used to specify the type of an <tref>item</tref>.
+ An additional attribute on an element used to specify one or more types of an <tref>item</tref>.
The specified type is also used to resolve non-URI <tref>name</tref>s to <tref>absolute URI</tref>s.
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.itemType</code>.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite>
- of [[!MICRODATA]]).
+ Available through the
+ <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemtype">element.itemType</a></cite></code>.
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemtype">Items</a></cite>
+ in [[!MICRODATA]]).
</dd>
<dt><adef>src</adef></dt><dd>
An attribute appropriate for use with <code>audio</code>, <code>embed</code>, <code>iframe</code>,
- <code>img</code>, <code>source</code>, <code>track</code>, or <code>video</code> elements for creating invisible
- properties.
+ <code>img</code>, <code>source</code>, <code>track</code>, or <code>video</code> elements for used to create a
+ <tref>URI reference</tref> value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>.
</dd>
<dt><adef>value</adef></dt><dd>
- An attribute appropriate for use with the <code>data</code> element for creating untyped literals.
+ An attribute appropriate for use with the <code>data</code> element used to create an <tref>plain literal</tref>
+ value for
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>.
</dd>
</dl>
</section>
@@ -508,17 +535,12 @@
<a href="#generate-predicate-URI">Generate Predicate URI</a>.</p>
<p>Possible values for <tref><code>propertyURI</code></tref> are the following:</p>
<dl>
- <dt><code>base</code></dt><dd>
- <p>The <code>base</code> URI generation scheme uses an <aref>itemtype</aref> URI to create a
- property URI by using the portion of the itemtype URI up to and including the final '#' or '/'.</p>
- <p>For example, given a type of <code>http://schema.org/Person</code> and a property name of <code>name</code>,
- the resulting property URI would be <code>http://schema.org/name</code>.</p>
- </dd>
<dt><code>contextual</code></dt><dd>
The <code>contextual</code> URI generation scheme guarantees that generated property URIs are
unique based on the value of <tref>current property</tref>. This is
required as the microdata data model requires that property names are associated with specific
- items and do not have a global scope.
+ items and do not have a global scope. (See <a href="#scheme-context">Step 5</a> in
+ <a href="#generate-predicate-URI">Generate Predicate URI</a>).
<div>
<p>URI creation uses a base URI with query parameters to indicate the in-scope
type and property name list. Consider the following example:</p>
@@ -556,19 +578,75 @@
</rdf:Description>
-->
</pre>
+ <p>Looking at another example:</p>
+ <pre class="example" data-transform="updateExample">
+<!--
+<div itemscope itemtype="http://schema.org/Person">
+ <h2 itemprop="name">Jeni</h2>
+</div>
+-->
+ </pre>
+ <p>This would generate <code>http://www.w3.org/ns/md?type=http://schema.org/Person&prop=name</code>.</p>
</div>
</dd>
- <dt><code>type</code></dt><dd>
- The <code>type</code> URI generation scheme appends <tref>property names</tref> that are not
- <tref>absolute URI</tref>s to <tref>current type</tref> using a "#" separator.
- </dd>
<dt><code>vocabulary</code></dt><dd>
- The <code>vocabulary</code> URI generation scheme appends <tref>property names</tref> that are not
- <tref>absolute URI</tref>s to the <tref>URI prefix</tref>.
+ The <code>vocabulary</code> URI generation scheme appends <tref>property names</tref> that are not <tref>absolute
+ URI</tref>s to the <tref>URI prefix</tref>. When generating property URIs, if the <tref>URI prefix</tref> does not end
+ with a '/' or '#', a '#' is appended to the URI prefix. (See <a href="#scheme-vocab">Step 4</a> in
+ <a href="#generate-predicate-URI">Generate Predicate URI</a>.)
+ <div>
+ <p>URI creation uses a base URI with query parameters to indicate the in-scope
+ type and property name list. Consider the following example:</p>
+ <pre class="example" data-transform="updateExample">
+<!--
+<span itemscope itemtype="http://microformats.org/profile/hcard">
+ <span itemprop="n" itemscope>
+ <span itemprop="given-name">
+ Princeton
+ </span>
+ </span>
+</span>
+-->
+ </pre>
+ <p>Given the <tref>URI prefix</tref> <code>http://microformats.org/profile/hcard</code>, this
+ would generate <code>http://microformats.org/profile/hcard#n</code> and
+ <code>http://microformats.org/profile/hcard#given-name</code>. Note that the '#' is automatically
+ added as a separator.
+ <p>Looking at another example:</p>
+ <pre class="example" data-transform="updateExample">
+<!--
+<div itemscope itemtype="http://schema.org/Person">
+ <h2 itemprop="name">Jeni</h2>
+</div>
+-->
+ </pre>
+ <p>Given the <tref>URI prefix</tref> <code>http://schema.org/</code>,
+ this would generate <code>http://schema.org/name</code>. Note that if the <aref>itemtype</aref>
+ were <code>http://schema.org/Person/Teacher</code>, this would generate the same property URI.</p>
+ </div>
</dd>
</dl>
- <p>The default value of <tref><code>propertyURI</code></tref> is <code>base</code>.</p>
-</section>
+ <p>If the <tref>registry</tref> contains no match for <tref>current type</tref> implementations act as if
+ there is a <tref>URI prefix</tref> made from the first <aref>itemtype</aref> value by stripping either
+ the fragment content or local name, if the value has no fragment.</p>
+ <p class="note">Deconstructing the <aref>itemtype</aref> URI to create or identify a vocabulary URI
+ is a violation of the microdata specification which is necessary to
+ support the use of existing vocabularies designed for use with RDF, and
+ shared or inherited properties within all vocabularies.</p>
+ <p>The default value of <tref><code>propertyURI</code></tref> is <code>vocabulary</code>.</p>
+ <pre class="example" data-transform="updateExample">
+<!--
+<div itemscope itemtype="http://schema.org/Book">
+ <h2 itemprop="title">Just a Geek</h2>
+</div>
+-->
+ </pre>
+ <p>In this example, assuming no matching entry in the <tref>registry</tref>,
+ the <tref>URI prefix</tref> is constructed by removing the local name, leaving the URI
+ <code>http://schema.org/</code>. As there is no explicit <tref><code>propertyURI</code></tref>,
+ the default <code>vocabulary</code> is used, and the resulting property URI would be
+ <code>http://schema.org/title</code>.</p>
+/section>
<section class="informative">
<h2>Value Ordering</h2>
@@ -678,18 +756,18 @@
</dd>
<dt><tdef>document base</tdef></dt><dd>
The base address of the document being processed, as defined in <cite><a
- href="http://dev.w3.org/html5/spec/Overview.html#resolving-urls">Section 2.6.3 Resolving URLs</a> of
- [[!HTML5]]</cite>.
+ href="http://dev.w3.org/html5/spec/Overview.html#resolving-urls">Resolving URLs</a></cite> in
+ [[!HTML5]].
</dd>
<dt><tdef>evaluation context</tdef></dt><dd>
A data structure including the following elements:
<dl>
<dt><tdef>memory</tdef></dt><dd>
- a mapping of items to subjects, initially empty
+ a mapping of items to subjects, initially empty;
</dd>
<dt><tdef>current property</tdef></dt><dd>
an <tref>absolute URI</tref> for the <em>current property</em>, used for generating URIs
- for properties of items without an explicit <aref>itemtype</aref>.
+ for properties of items without an explicit <aref>itemtype</aref>;
<div class="note">
<tref>current property</tref> is required for the <code>contextual</code> property URI generation
scheme. Without this scheme, this evaluation context component would not be required.
@@ -697,29 +775,30 @@
</dd>
<dt><tdef>current type</tdef></dt><dd>
an <tref>absolute URI</tref> for the <em>current type</em>, used when an <tref>item</tref> does not
- contain an explicit <aref>itemtype</aref>
+ contain an explicit <aref>itemtype</aref>;
</dd>
<dt><tdef>current vocabulary</tdef></dt><dd>
- an <tref>absolute URI</tref> for the <em>current vocabulary</em>, from the <tref>registry</tref>
+ an <tref>absolute URI</tref> for the <em>current vocabulary</em>, from the <tref>registry</tref>.
</dd>
</dl>
</dd>
<dt><tdef>item</tdef></dt><dd>
- An <tref>item</tref> is defined as an element containing an <aref>itemscope</aref> attribute. (See <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite> of
- [[!MICRODATA]]).
+ An <tref>item</tref> is defined as an element containing an <aref>itemscope</aref> attribute. The list
+ of top-level microdata items may be retrieved using the
+ <a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite>
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-getitems">document.getItems</a></cite></code>
+ method.
</dd>
<dt><tdef>item properties</tdef></dt><dd>
- The mechanism for finding the <tref title="item properties">properties of an item</tref> are described in
- <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#the-properties-of-an-item">Section 3.5
- Associating names with items</a></cite> of [[!MICRODATA]].
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.properties</code>.
+ The mechanism for finding the <tref title="item properties">properties of an item</tref> The list
+ of itemproperties items may be retrieved using the
+ <a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite>
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-properties">element.properties</a></cite></code>
+ attribute.
</dd>
<dt><tdef>global identifier</tdef></dt><dd>
The value of an <tref>item</tref>'s <aref>itemid</aref> attribute, if it has one. (See <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Section 3.2 Items</a></cite> of
+ href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Items</a></cite> in
[[!MICRODATA]]).
</dd>
<dt><tdef>literal</tdef></dt><dd>
@@ -729,28 +808,34 @@
</dd>
<dt><tdef>property names</tdef></dt><dd>
The tokens of an element's <aref>itemprop</aref> attribute.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#property-names">Section 3.3 Names: the
- itemprop attribute</a></cite> of [[!MICRODATA]]).
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#property-names">Names: the
+ itemprop attribute</a></cite> in [[!MICRODATA]]).
</dd>
<dt><tdef>property value</tdef></dt><dd>
The <tref>property value</tref> of a name-value pair added by an element with an <aref>itemprop</aref>
attribute depends on the element.
- Available through the <cite><a
- href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
- <code>element.itemValue</code>.
- (Updated from <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#url-property-elements">Section
- 3.4 Values</a></cite> of [[!MICRODATA]]).
+ The
+ <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">microdata DOM API</a></cite>
+ defines the
+ <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemvalue">element.itemValue</a></cite></code>
+ attribute that MAY be used to retrieve an item property value. Implementations
+ using <code>itemValue</code> MUST coerce values with the lexical form of <tref>absolute URI</tref>
+ to a <tref>URI reference</tref>. All other values MUST be coerced to an <tref>plain literal</tref>.
+ Alternatively, processors MAY provide an alternative implementation of <code>itemValue</code> to provide
+ extra fidelity in creating RDF resources. The behavior of this attribute depends on the element, as follows:
<dl>
- <dt>If the element also has an <aref>itemscope</aref> attribute</dt>
+ <dt>If the element has no <aref>itemprop</aref> attribute</dt>
+ <dd>The value is null and no triple should be generated.</dd>
+ <dt>If the element has an <aref>itemscope</aref> attribute</dt>
<dd>
The value is the <tref>item</tref> created by the element as a <tref>URI reference</tref> or
- <tref>blank node</tref>
+ <tref>blank node</tref>.
</dd>
<dt>If the element is a <code>meta</code> element</dt>
<dd>
The value is the <tref>plain literal</tref> created from the value of the element's <aref>content</aref>
attribute, if any, or the empty string if there is no such attribute.
- If the language of the element is known it MUST be used when creating the <tref>plain literal</tref>.
+ If the language of the element is known it SHOULD be used when creating the <tref>plain literal</tref>.
</dd>
<dt>
If the element is an <code>audio</code>, <code>embed</code>, <code>iframe</code>, <code>img</code>,
@@ -758,7 +843,9 @@
</dt>
<dd>
The value is a <tref>URI reference</tref> that results from resolving the value of the element's
- <aref>src</aref> attribute relative to the element at the time the attribute is set.
+ <aref>src</aref> attribute as defined in <cite><a
+ href="http://dev.w3.org/html5/spec/Overview.html#resolving-urls">Resolving URLs</a></cite> in
+ [[!HTML5]].
</dd>
<dt>
If the element is an <code>a</code>, <code>area</code>, or <code>link</code> element with an
@@ -766,16 +853,22 @@
</dt>
<dd>
The value is a <tref>URI reference</tref> that results from resolving the value of the element's
- <aref>href</aref> attribute relative to the element at the time the attribute is set.
+ <aref>href</aref> attribute as defined in <cite><a
+ href="http://dev.w3.org/html5/spec/Overview.html#resolving-urls">Resolving URLs</a></cite> in
+ [[!HTML5]].
</dd>
<dt>If the element is an <code>object</code> element with a <aref>data</aref> attribute</dt>
<dd>
The value is <tref>URI reference</tref> that results from resolving the value of the element's
- <aref>data</aref> attribute relative to the element at the time the attribute is set.
+ <aref>data</aref> attribute as defined in <cite><a
+ href="http://dev.w3.org/html5/spec/Overview.html#resolving-urls">Resolving URLs</a></cite> in
+ [[!HTML5]].
</dd>
<dt>If the element is a <code>data</code> element with a <aref>value</aref> attribute</dt>
<dd>The value is a <tref>plain literal</tref> created from the value.</dd>
- <dt>If the element is a <code>time</code> element with a <aref>datetime</aref> attribute</dt>
+ <dt>If the element is a <code>time</code> element.</dt>
+ <dd>The value is a <tref>literal</tref> made from the value of the <aref>datetime</aref> attribute
+ or the element's <code>textContent</code> if there is no <aref>datetime</aref> attribute.
<dd>
<dl>
<dt>
@@ -815,11 +908,16 @@
<dt>Otherwise</dt>
<dd>The value is a <tref>plain literal</tref> created from the value.</dd>
</dl>
+ <div class="issue">
+ The content model of the <code>time</code> element is subject to change, and may include
+ more content types, such as <code>xsd:duration</code>, <code>xsd:gYear</code>, <code>xsd:gYearMonth</code>
+ and <code>xsd:monthDay</code> in the future.
+ </div>
</dd>
<dt>Otherwise</dt>
<dd>
- The value is a <tref>plain literal</tref>, with the language information set from the language of the
- element, if it is not unknown.
+ The value is a <tref>plain literal</tref> from the element's <code>textContent</code>,
+ with the language information set from the language of the element, if it is not unknown.
</dd>
</dl>
</dd>
@@ -828,8 +926,7 @@
Available through the <cite><a
href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite> as
<code>document.getItems</code>.
- (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#top-level-microdata-items">Section 3.5
- Associating names with items</a></cite> of [[!MICRODATA]]).
+ (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#top-level-microdata-items">Associating names with items</a></cite> in [[!MICRODATA]]).
</dd>
<dt><tdef>URI reference</tdef></dt><dd>
URI references are suitable to be used in <em>subject</em>, <em>predicate</em> or <em>object</em> positions
@@ -944,8 +1041,10 @@
If <em>type</em> is not an <tref>absolute URI</tref>, set it to <tref>current type</tref> from the
<tref>Evaluation Context</tref> if not empty.
</li>
- <li>If the registry contains a <tref>URI prefix</tref> that is a character for character match of <em>type</em>
+ <li>If the <tref>registry</tref> contains a <tref>URI prefix</tref> that is a character for character match of <em>type</em>
up to the length of the <tref>URI prefix</tref>, set <em>vocab</em> as that <tref>URI prefix</tref>.
+ <li>Otherwise, construct <em>vocab</em> by removing everything following the last SOLIDUS U+002F ("/")
+ or NUMBER SIGN U+0023 ("#") from <em>type</em>.</li>
<li>
Set <em>property list</em> to an empty mapping between properties and one or more ordered
<em>value</em>s as established below.
@@ -1024,27 +1123,13 @@
<li>Otherwise, if <tref>current vocabulary</tref> from <em>context</em> is not null
and <tref>registry</tref> has an entry for <tref>current vocabulary</tref> having a
<tref>propertyURI</tref> entry that is not null, set that as <em>scheme</em>. Otherwise,
- set <em>scheme</em> to <code>base</code>.</li>
- <li>If <em>scheme</em> is <code>base</code> return the <tref>URI reference</tref> constructed
- by removing everything following the last SOLIDUS U+002F ("/") or NUMBER SIGN U+0023 ("#")
- from <tref>current type</tref> and append the fragment-escaped value of <em>name</em>.</li>
- <li>If <em>scheme</em> is <code>vocabulary</code> return the <tref>URI reference</tref> constructed
- by appending the fragment escaped value of <em>name</em> to <tref>current vocabulary</tref>.</li>
- <li>If <em>scheme</em> is <code>type</code>, return the <tref>URI reference</tref> constructed as follows:
- <ol class="algorithm">
- <li>Let <em>s</em> be <tref>current type</tref> from <em>context</em>.</li>
- <li>If <em>s</em> does not contain a U+0023 NUMBER SIGN character (#),
- then append a U+0023 NUMBER SIGN character (#) to <em>s</em>.</li>
- <li>Return the concatenation of <em>s</em>
- and the fragment-escaped value of <em>name</em> as a <tref>URI reference</tref>.</li>
- </ol>
- <div class="note">
- The use of the NUMER SIGN as a separator is somewhat arbitrary. A future edition of this document
- may include additional registry parameters that could identify a different separator character (such
- as SOLIDUS (/)).
- </div>
- </li>
- <li>If <em>scheme</em> is <code>contextual</code>, return the <tref>URI reference</tref> constructed as follows:
+ set <em>scheme</em> to <code>vocabulary</code>.</li>
+ <li id="scheme-vocab">If <em>scheme</em> is <code>vocabulary</code> return the <tref>URI reference</tref> constructed
+ by appending the fragment escaped value of <em>name</em> to <tref>current vocabulary</tref>,
+ separated by a U+0023 NUMBER SIGN character (#) unless the <tref>current vocabulary</tref> ends
+ with either a U+0023 NUMBER SIGN character (#) or SOLIDUS U+002F (/).</li>
+ <li id="scheme-context">If <em>scheme</em> is <code>contextual</code>, return the <tref>URI reference</tref>
+ constructed as follows:
<ol class="algorithm">
<li>Let <em>s</em> be <tref>current type</tref> from <em>context</em>.</li>
<li>If <code>http://www.w3.org/ns/md?type=</code> is a prefix of <em>s</em>,
@@ -1112,7 +1197,7 @@
<h2>Generate RDF Collection</h2>
<p>
An <tdef>RDF Collection</tdef> is a mechanism for defining ordered sequences of objects in RDF (See <cite><a
- href="http://www.w3.org/TR/rdf-syntax/#collections">Section 5.2 RDF Collections</a></cite> in
+ href="http://www.w3.org/TR/rdf-syntax/#collections">RDF Collections</a></cite> in
[[!RDF-SCHEMA]]). As the RDF data-model is that of an unordered graph, a linking method using properties
<code>rdf:first</code> and <code>rdf:next </code>is required to be able to specify a particular order.
</p>
@@ -1276,6 +1361,8 @@
<h1>Acknowledgements</h1>
<p>Thanks to Richard Cyganiak for property URI and vocabulary terminology and the general excellent
consideration of practical problems in generating RDF from microdata.</p>
+ <p>Thanks to Jeni Tennison for invaluable feedback and suggestions during the process of developing this specification
+ within the HTML Data Task Force.</p>
</section>
</body>