delete: <?xml version='1.0' encoding='UTF-8'?> delete: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> delete: <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">  insert: <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'> insert: <html lang="en" dir="ltr"> Microdata to RDF delete: <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> insert: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> delete: <link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text/css" charset="utf-8" /> insert: <link charset="utf-8" type="text/css" rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-IG-NOTE"> delete: <body style="display: inherit; "> insert: <body style="display: inherit;">

delete: <img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /> insert: <img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"> W3C

Microdata to RDF

Transformation from HTML+Microdata to RDF

delete: <h2 id="w3c-working-draft-12-january-2012"> insert: <h2 id="w3c-interest-group-note-08-march-2012">

W3C Working Draft 12 January Interest Group Note 08 March 2012

This version:
delete: <a href="http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/"> http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/ insert: <a href="http://www.w3.org/TR/2012/NOTE-microdata-rdf-20120308/"> http://www.w3.org/TR/2012/NOTE-microdata-rdf-20120308/
Latest published version:
http://www.w3.org/TR/microdata-rdf/
Latest editor's draft: Previous version:
delete: <a href="https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html"> https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html insert: <a href="http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/"> http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/
Editor:
Gregg Kellogg , Kellogg Associates
Authors:
Ian Hickson , Google, Inc.
Gregg Kellogg , Kellogg Associates
Jeni Tennison , Independent
insert: <dd>
insert: <a href="http://www.w3.org/People/Ivan/"> Iván Herman insert: </a> , insert: <a href="http://www.w3.org"> insert: <acronym title="World Wide Web Consortium"> W3C insert: </acronym> insert: </a> insert: </dd>
insert: <p>

This document is also available in this non-normative format: insert: <a href="diff-20120112.html"> diff to previous version insert: </a> . insert: </p>

delete: <hr /> insert: <hr>
delete: <div id="abstract" class="introductory section"> insert: <div class="introductory section" id="abstract">

Abstract

HTML microdata [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ] is an extension to HTML used to embed machine-readable data into HTML documents. Whereas the microdata specification describes a means of markup, the output format is JSON. This specification describes processing rules that may be used to extract RDF [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"> insert: <a href="#bib-RDF-CONCEPTS" rel="biblioentry" class="bibref"> RDF-CONCEPTS ] from an HTML document containing microdata.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is an experimental work in progress. The concepts described herein are intended to provide guidance for a possible future Working Group chartered to provide a Recommendation for this transformation. As a consequence, implementers of this specification, either producers or consumers, should note that it may change prior to any possible publication as a Recommendation.

This document was published by the HTML Data Task Force, Semantic Web Interest Group as a First Public Working Draft. an Interest Group Note. If you wish to make comments regarding this document, please send them to public-html-data-tf@w3.org ( subscribe , archives ). All feedback is welcome.

Publication as a Working Draft an Interest Group Note does not imply endorsement by the delete: <acronym title="World Wide Web Consortium"> insert: <acronym title="World Wide Web Consortium"> W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. insert: </p>

insert: <p>

The disclosure obligations of the Participants of this group are described in the delete: <a href="http://www.w3.org/2003/12/swa/swig-charter"> insert: <a href="http://www.w3.org/2006/07/swig-charter#Ipr"> charter .

delete: <div id="toc" class="section"> insert: <div class="section" id="toc">

Table of Contents

delete: <div class="informative section" id="introduction"> insert: <div id="introduction" class="informative section">

1. Introduction

This section is non-normative.

This document describes a means of transforming HTML containing microdata into RDF. HTML Microdata [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ] is an extension to HTML used to embed machine-readable data to HTML documents. This specification describes transformation directly to RDF [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"> insert: <a href="#bib-RDF-CONCEPTS" rel="biblioentry" class="bibref"> RDF-CONCEPTS ].

There are a variety of ways in which a mapping from microdata to RDF might be configured to give a result that is closer to the required result for a particular vocabulary. This specification defines terms that can be used as hooks for vocabulary-specific behavior, which could be defined within a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry or on an implementation-defined basis. However, the HTML Data TF recommends the adoption of a single method of mapping in which every vocabulary is treated as if:

For background on the trade-offs between these options, see http://www.w3.org/wiki/Mapping_Microdata_to_RDF .

delete: <div class="informative section" id="background"> insert: <div id="background" class="informative section">

1.1 Background

This section is non-normative.

Microdata [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> 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.

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 Section 1.2 below.

Microdata's data model does not align neatly with RDF.

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.

This specification allows for delete: <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary"> insert: <a href="#dfn-vocabulary" title="vocabulary" class="tref internalDFN"> vocabulary -specific rules that affect the generation of property URIs and value serializations. This is facilitated by a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry that associates URIs with specific rules based on matching delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype values against registered URI prefixes do determine a vocabulary and potentially vocabulary-specific processing rules.

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 delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value s.

delete: <div class="informative section" id="use-cases"> insert: <div id="use-cases" class="informative section">

1.2 Use Cases

This section is non-normative.

During the period of the task force, a number of use cases were put forth for the use of microdata in generating RDF:

delete: <div class="informative section" id="issues"> insert: <div id="issues" class="informative section">

1.3 Issues

This section is non-normative.

Decisions or open issues in the specification are tracked on the Task Force Issue Tracker . These include the following:

ISSUE 1
Vocabulary specific parsing for Microdata. This specification attempts to create generic rules for processing microdata with typical RDF vocabularies. A delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry allows for exceptions to the default processing rules for certain well-known vocabularies.
ISSUE 2
Should Microdata-RDF generate XMLLiteral values. This issue has been closed with no change as this would violate microdata's data model.
ISSUE 3
Should the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry allow property datatype specification. The consensus is that datatypes are only derived from HTML semantics, so that only <time> values have a datatype other than plain.
ISSUE 4
Should the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry allow a delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name or URL to be used as an alias for delete: <a class="aref internalDFN" title="itemid" href="#dfn-itemid"> insert: <a href="#dfn-itemid" title="itemid" class="aref internalDFN"> @itemid .

The purpose of this specification is to provide input to a future working group that can make decisions about the need for a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry and the details of processing. Among the options investigated by the Task Force are the following:

insert: <p>

More examples and explanatory information are available in [ insert: <cite> insert: <a href="#bib-MICRODATA-RDF-SUPPLEMENT" rel="biblioentry" class="bibref"> MICRODATA-RDF-SUPPLEMENT insert: </a> insert: </cite> ], which may be updated from time to time. insert: </p>

delete: <div id="attributes-and-syntax" class="section"> insert: <div class="section" id="attributes-and-syntax">

2. Attributes and Syntax

The microdata specification [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ] defines a number of attributes and the way in which those attributes are to be interpreted. The microdata DOM API provides methods and attributes for retrieving microdata from the HTML DOM.

For reference, attributes used for specifying and retrieving HTML microdata are referenced here:

delete: <dfn class="adef" title="itemid" id="dfn-itemid"> insert: <dfn id="dfn-itemid" title="itemid" class="adef"> itemid
An attribute containing a URL used to identify the subject of triples associated with this delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item . (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn class="adef" title="itemprop" id="dfn-itemprop"> insert: <dfn id="dfn-itemprop" title="itemprop" class="adef"> itemprop
An attribute used to identify one or more delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name s of an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item s. An delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop contains a space separated list of delete: <dfn title="name" id="dfn-name"> insert: <dfn id="dfn-name" title="name"> name s which may either by delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL s or terms associated with the type of the delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item as defined by the referencing delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item 's delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type . (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn class="adef" title="itemref" id="dfn-itemref"> insert: <dfn id="dfn-itemref" title="itemref" class="adef"> itemref
An additional attribute on an element that references additional elements containing property definitions to be applied to the referencing delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item . (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn class="adef" title="itemscope" id="dfn-itemscope"> insert: <dfn id="dfn-itemscope" title="itemscope" class="adef"> itemscope
An boolean attribute identifying an element as an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item . (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn class="adef" title="itemtype" id="dfn-itemtype"> insert: <dfn id="dfn-itemtype" title="itemtype" class="adef"> itemtype
An additional attribute on an element used to specify one or more types of an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item . The delete: <dfn title="item_type" id="dfn-item_type"> insert: <dfn id="dfn-item_type" title="item_type"> item type of an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item is the first value returned from element.itemType on the element. The delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type is also used to resolve non-URL delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name s to delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL s. Available through the Microdata DOM API as element.itemType . (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).

In RDF, it is common for people to shorten vocabulary terms via abbreviated URIs that use a 'prefix' and a 'reference'. throughout this document assume that the following vocabulary prefixes have been defined:

dc: http://purl.org/dc/terms/
md: http://www.w3.org/ns/md#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
xsd: http://www.w3.org/2001/XMLSchema#
delete: <div class="informative section" id="vocabulary-registry"> insert: <div id="vocabulary-registry" class="informative section">

3. Vocabulary Registry

This section is non-normative.

In a perfect world, all processors would be able to generate the same output for a given input without regards to the requirements of a particular delete: <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary"> insert: <a href="#dfn-vocabulary" title="vocabulary" class="tref internalDFN"> vocabulary . However, microdata doesn't provide sufficient syntactic help in making these decisions. Different vocabularies have different needs.

The registry is located at the namespace defined for microdata: http://www.w3.org/ns/md in a variety of formats.

The delete: <dfn title="registry" id="dfn-registry"> insert: <dfn id="dfn-registry" title="registry"> registry associates a delete: <dfn title="uri_prefix" id="dfn-uri_prefix"> insert: <dfn id="dfn-uri_prefix" title="uri_prefix"> URI prefix with one or more key-value pairs denoting processor behavior. A hypothetical JSON representation of such a registry might be the following:

 { "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "tracks": {"multipleValues": "list"}  "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "tracks": {"multipleValues": "list"}  } }, "http://microformats.org/profile/hcard": { "propertyURI": "vocabulary", "multipleValues": "list", "properties" { "url": {"multipleValues": "unordered"}  "http://microformats.org/profile/hcard": { "propertyURI": "vocabulary", "multipleValues": "list", "properties" { "url": {"multipleValues": "unordered"}  } } } 

This structure associates mappings for two URIs, http://schema.org/ and http://microformats.org/profile/hcard . Items having an delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type with a delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix from this delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry use the the rules described for that prefix within the scope of that delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type . This mapping currently defines two rules: delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI and delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues with values to indicate specific behavior. It also allows overrides on a per-property basis; the delete: <a class="tref internalDFN" title="properties" href="#dfn-properties"> insert: <a href="#dfn-properties" title="properties" class="tref internalDFN"> properties key associates an individual delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name with overrides for default behavior. The interpretation of these rules is defined in the following sections. If an item has no delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type or the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains no delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix matching delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type , a conforming processor delete: <em class="rfc2119" title="must"> insert: <em title="must" class="rfc2119"> must use the default values defined for these rules.

The concept of a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry , including a hypothetical format, location and updating rules is presented as an abstract concept useful for describing the function of a microdata processor. There are issues surrounding update frequency, URL naming, and how updates are authorized. This spec just considers the semantic content of such a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry and how it can be used to affect processing without defining its representation or update policies.

Richard Ciganiak has pointed out that "Registry" "Registry" may be the wrong term, as the proposed delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry doesn't assign identifiers or manage namespace, it simply provides a mapping between delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix ss and processor behavior and suggests the term "Whitelist". "Whitelist". As more than two values are required, and it describes more than binary behavior, this term isn't appropriate either.

delete: <div class="informative section" id="property-uri-generation"> insert: <div id="property-uri-generation" class="informative section">

3.1 Property URI Generation

This section is non-normative.

For delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name s which are not delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL s, the delete: <dfn title="propertyuri" id="dfn-propertyuri"> insert: <dfn id="dfn-propertyuri" title="propertyuri"> propertyURI rule defines the algorithm for generating an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL given an delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context including a delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type , delete: <a class="tref internalDFN" title="current_name" href="#dfn-current_name"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name and delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary .

The procedure for generating property URIs is defined in Generate Predicate URI .

Possible values for delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI are the following:

contextual
The contextual URI generation scheme guarantees that generated property URIs are unique based on the value of delete: <a class="tref internalDFN" title="current_name" href="#dfn-current_name"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name . This is required as the microdata data model requires that delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name s are associated with specific items and do not have a global scope. (See Step 5 in Generate Predicate URI ).

URI creation uses a base URI with query parameters to indicate the in-scope type and delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name list. Consider the following example:

 <span itemscope itemtype="http://microformats.org/profile/hcard">  itemtype="http://microformats.org/profile/hcard">  <span itemprop="n"  itemprop="n"  itemscope> <span itemprop="given-name">  itemprop="given-name">  Princeton </span> </span> </span> 

The first delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name n generates the URI http://www.w3.org/ns/md?type=http://microformats.org/profile/hcard?prop=n . However, the included delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name given-name is included in untyped item. The inherited property URI is used to create a new property URI: http://www.w3.org/ns/md?type=http://microformats.org/profile/hcard?prop=n.given-name .

This scheme is compatible with the needs of other RDF serialization formats such as RDF/XML [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX-GRAMMAR"> insert: <a href="#bib-RDF-SYNTAX-GRAMMAR" rel="biblioentry" class="bibref"> RDF-SYNTAX-GRAMMAR ], which rely on QNames for expressing properties. For example, the generated property URIs can be split as follows:

 <rdf:Description xmlns:hcard="http://www.w3.org/ns/md?type=http://microformats.org/profile/hcard?prop=" rdf:type="http://microformats.org/profile/hcard">  xmlns:hcard="http://www.w3.org/ns/md?type=http://microformats.org/profile/hcard?prop=" rdf:type="http://microformats.org/profile/hcard">  <hcard:n> <rdf:Description> <hcard:n.given-name> Princeton </hcard:n.given-name> </rdf:Description> </hcard:n> </rdf:Description> 

Looking at another example:

 <div itemscope itemtype="http://schema.org/Person">  itemtype="http://schema.org/Person">  <h2 itemprop="name">Jeni</h2>  itemprop="name">Jeni</h2>  </div> 

This would generate http://www.w3.org/ns/md?type=http://schema.org/Person&prop=name .

vocabulary
The vocabulary URI generation scheme appends delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name s that are not delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL s to the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix . When generating property URIs, if the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix does not end with a '/' or '#', a '#' is appended to the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix . (See Step 4 in Generate Predicate URI .)

URI creation uses a base URL with query parameters to indicate the in-scope type and delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name list. Consider the following example:

 <span itemscope itemtype="http://microformats.org/profile/hcard">  itemtype="http://microformats.org/profile/hcard">  <span itemprop="n"  itemprop="n"  itemscope> <span itemprop="given-name">  itemprop="given-name">  Princeton </span> </span> </span> 

Given the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix http://microformats.org/profile/hcard , this would generate http://microformats.org/profile/hcard#n and http://microformats.org/profile/hcard#given-name . Note that the '#' is automatically added as a separator.

Looking at another example:

 <div itemscope itemtype="http://schema.org/Person">  itemtype="http://schema.org/Person">  <h2 itemprop="name">Jeni</h2>  itemprop="name">Jeni</h2>  </div> 

Given the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix http://schema.org/ , this would generate http://schema.org/name . Note that if the delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype were http://schema.org/Person/Teacher , this would generate the same property URI.

If the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains no match for delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type implementations act as if there is a delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix made from the first delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype value by stripping either the fragment content or last path segment , if the value has no fragment (See [ delete: <a class="bibref" rel="biblioentry" href="#bib-RFC3986"> insert: <a href="#bib-RFC3986" rel="biblioentry" class="bibref"> RFC3986 ]).

Deconstructing the delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype URL 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.

The default value of delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI is vocabulary .

 <div itemscope itemtype="http://schema.org/Book">  itemtype="http://schema.org/Book">  <h2 itemprop="title">Just  itemprop="title">Just  a Geek</h2> </div> 

In this example, assuming no matching entry in the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry , the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix is constructed by removing the last path segment , leaving the URI http://schema.org/ . As there is no explicit delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI , the default vocabulary is used, and the resulting property URI would be http://schema.org/title .

delete: <div class="informative section" id="value-ordering"> insert: <div id="value-ordering" class="informative section">

3.2 Value Ordering

This section is non-normative.

For items having multiple values for a given delete: <a class="tref internalDFN" title="property" href="#dfn-property"> insert: <a href="#dfn-property" title="property" class="tref internalDFN"> property , the delete: <dfn title="multiplevalues" id="dfn-multiplevalues"> insert: <dfn id="dfn-multiplevalues" title="multiplevalues"> multipleValues rule defines the algorithm for serializing these values. Microdata uses document order when generating delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value s, as defined in Microdata DOM API as element.itemValue . However, many RDF vocabularies expect multiple values to be generated as triples sharing a common subject and predicate. In some cases, it may be useful to retain value ordering.

The procedure for generating delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value s is defined in Generate Property Values .

Possible values for delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues are the following:

unordered
Values are serialized without ordering using a common subject and predicate. (See Step 7 in Generate Property Values ).
list
Multi-valued delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop s are serialized using an delete: <a class="tref internalDFN" title="rdf_collection" href="#dfn-rdf_collection"> insert: <a href="#dfn-rdf_collection" title="rdf_collection" class="tref internalDFN"> RDF Collection . (See Step 8 in Generate Property Values ).

An example of how this might be specified in a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry is the following:

 { "http://schema.org/": { "propertyURI": "vocabulary",  "http://schema.org/": { "propertyURI": "vocabulary",   "multipleValues": "unordered"  "multipleValues": "unordered"   }, "http://microformats.org/profile/hcard": { "propertyURI": "type",  "http://microformats.org/profile/hcard": { "propertyURI": "vocabulary",   "multipleValues": {"multipleValues": "list"}  "multipleValues": {"multipleValues": "list"}   } } 

Additionally, some vocabularies may wish to specify this on a per-property basis. For example, within http://schema.org/MusicPlaylist the tracks property might depend on the order of values to to reproduce associated MusicRecording values.

 { "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered"  "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered"   , "properties": { "tracks": {"multipleValues": "list"}  "properties": { "tracks": {"multipleValues": "list"}  }  } } 

The delete: <dfn title="properties" id="dfn-properties"> insert: <dfn id="dfn-properties" title="properties"> properties key takes a JSON Object as a value, which in turn has keys for each property that is to be given alternate semantics. Each delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name is implicitly expanded to it's URI representation as defined in Generate Predicate URI , so that the behavior is the same whether or not the delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name is listed as an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL .

The default value of delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues is unordered .

An alternative mechanism would output both unordered and ordered values, to allow an application to choose the most useful representation. For example, consider the following:

 <div itemscope="" itemtype="http://schema.org/MusicPlaylist">  itemscope="" itemtype="http://schema.org/MusicPlaylist">  <span itemprop="name">Classic  itemprop="name">Classic  Rock Playlist</span> <meta itemprop="numTracks" content="2"/>  itemprop="numTracks" content="2"/>  <p>Including works by <span itemprop="byArtist">Lynard  itemprop="byArtist">Lynard  Skynard</span> and <span itemprop="byArtist">AC/DC</span></p>.  itemprop="byArtist">AC/DC</span></p>.  <div itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  1.<span itemprop="name">Sweet  itemprop="name">Sweet  Home Alabama</span> - <span itemprop="byArtist">Lynard  itemprop="byArtist">Lynard  Skynard</span> <link href="sweet-home-alabama" itemprop="url"  href="sweet-home-alabama" itemprop="url"  /> </div> <div itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  2.<span itemprop="name">Shook  itemprop="name">Shook  you all Night Long</span> - <span itemprop="byArtist">AC/DC</span>  itemprop="byArtist">AC/DC</span>  <link href="shook-you-all-night-long" itemprop="url"  href="shook-you-all-night-long" itemprop="url"  /> </div> </div> 

This might generate the following Turtle:

 @prefix md: <http://www.w3.org/ns/md#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix schema: <http://schema.org/> . <> md:item [ a schema:MusicPlaylist; schema:name "Classic  "Classic  Rock Playlist";  Playlist";  schema:byArtist ("Lynard Skynard" "AC/DC");  ("Lynard Skynard" "AC/DC");  schema:numTracks "2";  "2";  schema:tracks _:track1, _:track2, (_:track1 _:track2) ] . _:track1 a schema:MusicRecording; schema:byArtist ("Lynard Skynard");  ("Lynard Skynard");  schema:name "Sweet  "Sweet  Home Alabama";  Alabama";  schema:url <sweet-home-alabama> . _:track2 a schema:MusicRecording; schema:byArtist ("AC/DC");  ("AC/DC");  schema:name "Shook  "Shook  you all Night Long";  Long";  schema:url <shook-you-all-night-long> . 

By providing both _:track1 and _:track2 as object values of the playlist along with an RDF Collection containing the ordered values, the data may be queried via a simple query using the playlist subject, or as an ordered collection.

delete: <div class="informative section" id="value-typing"> insert: <div id="value-typing" class="informative section">

3.3 Value Typing

This section is non-normative.

In microdata, all values are strings. In RDF, values may be resources or may be typed with an appropriate datatype.

In some cases, the type of a microdata value can be determined from the element on which it is specified. In particular:

Using information about the content of the document where the microdata is marked up might be a violation of the spirit of the microdata specification, though it does not explicitly say in normative text that consumers cannot use other information from the HTML DOM to interpret microdata.

Additionally, one possible use of a delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry would allow vocabularies to be marked with datatype information, so that a dc:time value, for example, would be understood to represent a literal with datatype xsd:date . This could be done by adding information for each property in the vocabulary requiring special treatment.

This might be represented using a syntax such as the following:

 { "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered"  "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered"   , "properties": { "dateCreated": {"datatype": "http://www.w3.org/2001/XMLSchema#date"}  "properties": { "dateCreated": {"datatype": "http://www.w3.org/2001/XMLSchema#date"}  }  } } 

The datatype identifies a URI to be used in constructing a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal .

In most cases, the relevant datatype for a value can be derived from knowledge of what property the value is for and the syntax of the value itself. Thus, values can be given datatypes in a post-processing step after the mapping of microdata to RDF described by this specification. However, where there is information in the HTML markup, such as knowledge of what element was used to mark up the value, which can help with determining its datatype, that information is used by this specification.

This concept is not explored further at this time, but could be developed further in a future revision of this document.

If property URI generation was fixed to vocabulary , multiple values always generated both unordered and ordered representations, and there were datatype support, the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry could be reduced to a simple list of URLs without any further structure necessary.

delete: <div id="algorithm" class="section"> insert: <div class="section" id="algorithm">

4. Algorithm

Transformation of Microdata to RDF makes use of general processing rules described in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ] for the treatment of delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item s.

delete: <div id="algorithm-terms" class="section"> insert: <div class="section" id="algorithm-terms">

4.1 Algorithm Terms

delete: <dfn title="absolute_url" id="dfn-absolute_url"> insert: <dfn id="dfn-absolute_url" title="absolute_url"> absolute URL
The term absolute URL is defined in [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ].
delete: <dfn title="blank_node" id="dfn-blank_node"> insert: <dfn id="dfn-blank_node" title="blank_node"> blank node
A blank node is a node in a graph that is neither a delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference nor a delete: <a class="tref internalDFN" title="literal" href="#dfn-literal"> insert: <a href="#dfn-literal" title="literal" class="tref internalDFN"> literal . delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> Item s without a delete: <a class="tref internalDFN" title="global_identifier" href="#dfn-global_identifier"> insert: <a href="#dfn-global_identifier" title="global_identifier" class="tref internalDFN"> global identifier have a blank node allocated to them. (See [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"> insert: <a href="#bib-RDF-CONCEPTS" rel="biblioentry" class="bibref"> RDF-CONCEPTS ]).
delete: <dfn title="document_base" id="dfn-document_base"> insert: <dfn id="dfn-document_base" title="document_base"> document base
The base address of the document being processed, as defined in Resolving URLs in [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ].
delete: <dfn title="evaluation_context" id="dfn-evaluation_context"> insert: <dfn id="dfn-evaluation_context" title="evaluation_context"> evaluation context
A data structure including the following elements:
delete: <dfn title="memory" id="dfn-memory"> insert: <dfn id="dfn-memory" title="memory"> memory
a mapping of items to subjects, initially empty;
delete: <dfn title="current_name" id="dfn-current_name"> insert: <dfn id="dfn-current_name" title="current_name"> current name
an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL for the in-scope delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name , used for generating URIs for properties of items without an delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type ;
delete: <a class="tref internalDFN" title="current_name" href="#dfn-current_name"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name is required for the contextual property URI generation scheme. Without this scheme, this evaluation context component would not be required.
delete: <dfn title="current_type" id="dfn-current_type"> insert: <dfn id="dfn-current_type" title="current_type"> current type
an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL for the current type , used when an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item does not contain an delete: <a class="tref internalDFN" title="item_type" href="#dfn-item_type"> insert: <a href="#dfn-item_type" title="item_type" class="tref internalDFN"> item type ;
delete: <dfn title="current_vocabulary" id="dfn-current_vocabulary"> insert: <dfn id="dfn-current_vocabulary" title="current_vocabulary"> current vocabulary
an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL for the current vocabulary , from the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry .
delete: <dfn title="item" id="dfn-item"> insert: <dfn id="dfn-item" title="item"> item
An delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item is described by an element containing an delete: <a class="aref internalDFN" title="itemscope" href="#dfn-itemscope"> insert: <a href="#dfn-itemscope" title="itemscope" class="aref internalDFN"> @itemscope attribute. The list of top-level microdata items may be retrieved using the insert: <cite> Microdata DOM API insert: </cite> document.getItems method.
delete: <dfn title="item_properties" id="dfn-item_properties"> insert: <dfn id="dfn-item_properties" title="item_properties"> item properties
The mechanism for finding the delete: <a class="tref internalDFN" title="item_properties" href="#dfn-item_properties"> insert: <a href="#dfn-item_properties" title="item_properties" class="tref internalDFN"> properties of an item The list of item properties items may be retrieved using the insert: <cite> Microdata DOM API insert: </cite> element.properties attribute.
delete: <dfn title="fragment-escape" id="dfn-fragment-escape"> insert: <dfn id="dfn-fragment-escape" title="fragment-escape"> fragment-escape
The term fragment-escape is defined in [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ]. This involves transforming elements added to URLs to ensure that the result remains a valid URL. The following characters are subject to percent escaping:
  • U+0022 QUOTATION MARK character (") (")
  • U+0023 NUMBER SIGN character (#)
  • U+0025 PERCENT SIGN character (%)
  • U+003C LESS-THAN SIGN character (<)
  • U+003E GREATER-THAN SIGN character (>)
  • U+005B LEFT SQUARE BRACKET character ([)
  • U+005C REVERSE SOLIDUS character (\)
  • U+005D RIGHT SQUARE BRACKET character (])
  • U+005E CIRCUMFLEX ACCENT character (^)
  • U+007B LEFT CURLY BRACKET character ({)
  • U+007C VERTICAL LINE character (|)
  • U+007D RIGHT CURLY BRACKET character (})
delete: <dfn title="global_identifier" id="dfn-global_identifier"> insert: <dfn id="dfn-global_identifier" title="global_identifier"> global identifier
The value of an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item 's delete: <a class="aref internalDFN" title="itemid" href="#dfn-itemid"> insert: <a href="#dfn-itemid" title="itemid" class="aref internalDFN"> @itemid attribute, if it has one. (See Items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn title="literal" id="dfn-literal"> insert: <dfn id="dfn-literal" title="literal"> literal
Literals are values such as strings and dates, including delete: <dfn title="typed_literal" id="dfn-typed_literal"> insert: <dfn id="dfn-typed_literal" title="typed_literal"> typed literal s and delete: <dfn title="plain_literal" id="dfn-plain_literal"> insert: <dfn id="dfn-plain_literal" title="plain_literal"> plain literal s. (See [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"> insert: <a href="#bib-RDF-CONCEPTS" rel="biblioentry" class="bibref"> RDF-CONCEPTS ]).
delete: <dfn title="property" id="dfn-property"> insert: <dfn id="dfn-property" title="property"> property
Each delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name identifies a delete: <a class="tref internalDFN" title="property" href="#dfn-property"> insert: <a href="#dfn-property" title="property" class="tref internalDFN"> property of an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item . An delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item may have multiple elements sharing the same delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name , creating a multi-valued delete: <a class="tref internalDFN" title="property" href="#dfn-property"> insert: <a href="#dfn-property" title="property" class="tref internalDFN"> property .
delete: <dfn title="property_names" id="dfn-property_names"> insert: <dfn id="dfn-property_names" title="property_names"> property names
The tokens of an element's delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop attribute. Each token is a delete: <a class="tref internalDFN" title="name" href="#dfn-name"> insert: <a href="#dfn-name" title="name" class="tref internalDFN"> name . (See Names: the itemprop attribute in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn title="property_value" id="dfn-property_value"> insert: <dfn id="dfn-property_value" title="property_value"> property value
The delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value of a name-value pair added by an element with an delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop attribute depends on the element.
If the element has no delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop attribute
The value is null and no triple should be generated.
If the element creates an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item (by having an delete: <a class="aref internalDFN" title="itemscope" href="#dfn-itemscope"> insert: <a href="#dfn-itemscope" title="itemscope" class="aref internalDFN"> @itemscope attribute)
The value is the delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference or delete: <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"> insert: <a href="#dfn-blank_node" title="blank_node" class="tref internalDFN"> blank node returned from generate the triples for that delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item .
If the element is a URL property element ( a , area , audio , embed , iframe , img , link , object , source , track or video )
The value is a delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference created from element.itemValue . (See relevant attribute descriptions in [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ]).
If the element is a time element.
The value is a delete: <a class="tref internalDFN" title="literal" href="#dfn-literal"> insert: <a href="#dfn-literal" title="literal" class="tref internalDFN"> literal made from element.itemValue . delete: </dd> delete: <dd>
If the value is a valid date string having the lexical form of xsd:date [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#date .
If the value is a valid time string having the lexical form of xsd:time [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#time .
If the value is a valid local date and time string or valid global date and time string having the lexical form of xsd:dateTime [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#dateTime .
If the value is a valid month string having the lexical form of xsd:gYearMonth [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#gYearMonth .
If the value is a valid non-negative integer having the lexical form of xsd:gYear [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#gYearMonth .
If the value has the lexical form of xsd:duration [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ].
The value is a delete: <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"> insert: <a href="#dfn-typed_literal" title="typed_literal" class="tref internalDFN"> typed literal composed of the value and http://www.w3.org/2001/XMLSchema#duration .

The referenced version of [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ] does not include a duration data type, but it is in the Editor's Draft and is expected to be included in a forthcoming update to the Working Draft

Otherwise
The value is a delete: <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"> insert: <a href="#dfn-plain_literal" title="plain_literal" class="tref internalDFN"> plain literal created from the value with language information set from the lang IDL attribute of the property element.

The HTML valid yearless date string is similar to xsd:gMonthDay , but the lexical forms differ, so it is not included in this conversion.

See The time element in [ delete: <a class="bibref" rel="biblioentry" href="#bib-HTML5"> insert: <a href="#bib-HTML5" rel="biblioentry" class="bibref"> HTML5 ].

Otherwise
The value is a delete: <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"> insert: <a href="#dfn-plain_literal" title="plain_literal" class="tref internalDFN"> plain literal created from element.itemValue with language information set from the lang IDL attribute of the property element.
delete: <dfn title="top-level_item" id="dfn-top-level_item"> insert: <dfn id="dfn-top-level_item" title="top-level_item"> top-level item
An delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item which does not contain an delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop attribute. Available through the Microdata DOM API as document.getItems . (See Associating names with items in [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ]).
delete: <dfn title="uri_reference" id="dfn-uri_reference"> insert: <dfn id="dfn-uri_reference" title="uri_reference"> URI reference
URI references are suitable to be used in subject , predicate or object positions within an RDF triple, as opposed to a delete: <a class="tref internalDFN" title="literal" href="#dfn-literal"> insert: <a href="#dfn-literal" title="literal" class="tref internalDFN"> literal value that may contain a string representation of a URI. (See [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"> insert: <a href="#bib-RDF-CONCEPTS" rel="biblioentry" class="bibref"> RDF-CONCEPTS ]).

The HTML5/microdata content model for @href , @src , @data , delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype and delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop and delete: <a class="aref internalDFN" title="itemid" href="#dfn-itemid"> insert: <a href="#dfn-itemid" title="itemid" class="aref internalDFN"> @itemid is that of a URL, not a URI or IRI.

A proposed mechanism for specifying the range of delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value s to be URI reference or IRI could allow these to be specified as subject or object using a @content attribute.

delete: <dfn title="vocabulary" id="dfn-vocabulary"> insert: <dfn id="dfn-vocabulary" title="vocabulary"> vocabulary
A vocabulary is a collection of URIs, suitable for use as an delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype or delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop value, that share a common delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix . That prefix is the vocabulary URI. A vocabulary URI is not allowed to be a prefix of another vocabulary URI.
This definition differs from the language in the HTML spec and is just for the purpose of this document. In HTML, a vocabulary is a specification, and doesn't have a URI. In our view, if one specification defines ten delete: <a class="aref internalDFN" title="itemtype" href="#dfn-itemtype"> insert: <a href="#dfn-itemtype" title="itemtype" class="aref internalDFN"> @itemtype s, then these could be treated as one vocabulary or as ten distinct vocabularies; it is entirely up to the vocabulary creator.
delete: <div id="rdf-conversion-algorithm" class="section"> insert: <div class="section" id="rdf-conversion-algorithm">

4.2 RDF Conversion Algorithm

A HTML document containing microdata delete: <em class="rfc2119" title="may"> insert: <em title="may" class="rfc2119"> may be converted to any other RDF-compatible document format using the algorithm specified in this section.

A conforming microdata processor implementing RDF conversion delete: <em class="rfc2119" title="must"> insert: <em title="must" class="rfc2119"> must implement a processing algorithm that results in the equivalent triples to those that the following algorithm generates:

Set item list to an empty list.

  1. For each element that is also a delete: <a class="tref internalDFN" title="top-level_item" href="#dfn-top-level_item"> insert: <a href="#dfn-top-level_item" title="top-level_item" class="tref internalDFN"> top-level item run the following algorithm:
    1. Generate the triples for an item item , using the delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context . Let result be the ( delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference or delete: <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"> insert: <a href="#dfn-blank_node" title="blank_node" class="tref internalDFN"> blank node ) subject returned.
    2. Append result to item list .
  2. Generate an RDF Collection list from the ordered list of values. Set value to the value returned from generate an RDF Collection .
  3. Generate the following triple:
    subject
    delete: <a class="tref internalDFN" title="document_base" href="#dfn-document_base"> insert: <a href="#dfn-document_base" title="document_base" class="tref internalDFN"> Document base
    predicate
    http://www.w3.org/ns/md#item
    object
    value
delete: <div id="generate-the-triples" class="section"> insert: <div class="section" id="generate-the-triples">

4.3 Generate the triples

When the user agent is to Generate triples for an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item item , given an delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> Evaluation Context insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context , it must run the following steps:

This algorithm has undergone substantial change from the original microdata specification [ delete: <a class="bibref" rel="biblioentry" href="#bib-MICRODATA"> insert: <a href="#bib-MICRODATA" rel="biblioentry" class="bibref"> MICRODATA ].

  1. If there is an entry for item in delete: <a class="tref internalDFN" title="memory" href="#dfn-memory"> insert: <a href="#dfn-memory" title="memory" class="tref internalDFN"> memory , then let subject be the subject of that entry. Otherwise, if item has a delete: <a class="tref internalDFN" title="global_identifier" href="#dfn-global_identifier"> insert: <a href="#dfn-global_identifier" title="global_identifier" class="tref internalDFN"> global identifier and that delete: <a class="tref internalDFN" title="global_identifier" href="#dfn-global_identifier"> insert: <a href="#dfn-global_identifier" title="global_identifier" class="tref internalDFN"> global identifier is an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL , let subject be that delete: <a class="tref internalDFN" title="global_identifier" href="#dfn-global_identifier"> insert: <a href="#dfn-global_identifier" title="global_identifier" class="tref internalDFN"> global identifier . Otherwise, let subject be a new delete: <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"> insert: <a href="#dfn-blank_node" title="blank_node" class="tref internalDFN"> blank node .
  2. Add a mapping from item to subject in delete: <a class="tref internalDFN" title="memory" href="#dfn-memory"> insert: <a href="#dfn-memory" title="memory" class="tref internalDFN"> memory
  3. For each type returned from element.itemType of the element defining the delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item .
    1. If type is an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL , generate the following triple:
      subject
      subject
      predicate
      http://www.w3.org/1999/02/22-rdf-syntax-ns#type
      object
      type (as a delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference )
  4. Set type to the first value returned from element.itemType of the element defining the delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item .
  5. If type is not an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL , set it to delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name insert: </a> in insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context insert: </a> to null. insert: </li>
  6. insert: <li>
  7. Otherwise, set insert: <em> type insert: </em> to insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type from the delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> Evaluation Context insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context if not empty.
  8. If the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains a delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix that is a character for character match of type up to the length of the delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix , set vocab as that delete: <a class="tref internalDFN" title="uri_prefix" href="#dfn-uri_prefix"> insert: <a href="#dfn-uri_prefix" title="uri_prefix" class="tref internalDFN"> URI prefix .
  9. Otherwise, if type is not empty, construct vocab by removing everything following the last SOLIDUS U+002F ("/") ("/") or NUMBER SIGN U+0023 ("#") ("#") from the insert: <em> path insert: </em> component of type .
  10. Update delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context setting delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary to vocab .
  11. Set property list to an empty array mapping properties to one or more value s as established below.
  12. For each element element that has one or more delete: <a class="tref internalDFN" title="property_names" href="#dfn-property_names"> insert: <a href="#dfn-property_names" title="property_names" class="tref internalDFN"> property names and is one of the delete: <a class="tref internalDFN" title="item_properties" href="#dfn-item_properties"> insert: <a href="#dfn-item_properties" title="item_properties" class="tref internalDFN"> properties of the item item , in the order those elements are given by the algorithm that returns the delete: <a class="tref internalDFN" title="item_properties" href="#dfn-item_properties"> insert: <a href="#dfn-item_properties" title="item_properties" class="tref internalDFN"> properties of the item , run the following substep:
    1. For each name in the element's delete: <a class="tref internalDFN" title="property_names" href="#dfn-property_names"> insert: <a href="#dfn-property_names" title="property_names" class="tref internalDFN"> property names , run the following substeps:
      1. Let context be a copy of delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context with delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type set to type .
      2. Let predicate be the result of generate predicate URI using context and name . Update context by setting delete: <a class="tref internalDFN" title="current_name" href="#dfn-current_name"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name to predicate .
      3. Let value be the delete: <a class="tref internalDFN" title="property_value" href="#dfn-property_value"> insert: <a href="#dfn-property_value" title="property_value" class="tref internalDFN"> property value of element .
      4. If value is an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item , then generate the triples for value using context . Replace value by the subject returned from those steps.
      5. Add value to property list for predicate .
  13. For each predicate in property list :
    1. Generate property values subject , predicate and the list of values associated with predicate from property list as values .
  14. Return subject
delete: <div id="generate-predicate-uri" class="section"> insert: <div class="section" id="generate-predicate-uri">

4.4 Generate Predicate URI

Predicate URI generation makes use of delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type , delete: <a class="tref internalDFN" title="current_name" href="#dfn-current_name"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current name , and delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary from an delete: <a class="tref internalDFN" title="evaluation_context" href="#dfn-evaluation_context"> insert: <a href="#dfn-evaluation_context" title="evaluation_context" class="tref internalDFN"> evaluation context context along with name .

  1. If name is an delete: <a class="tref internalDFN" title="absolute_url" href="#dfn-absolute_url"> insert: <a href="#dfn-absolute_url" title="absolute_url" class="tref internalDFN"> absolute URL , return name as a delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference .
  2. If delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type from context is null, there can be no delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary . Return the delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference that is the delete: <a class="tref internalDFN" title="document_base" href="#dfn-document_base"> insert: <a href="#dfn-document_base" title="document_base" class="tref internalDFN"> document base with its fragment set to the delete: <a class="tref internalDFN" title="fragment-escape" href="#dfn-fragment-escape"> insert: <a href="#dfn-fragment-escape" title="fragment-escape" class="tref internalDFN"> fragment-escape d value of name delete: <p> delete: </p> .
    This rule is intended to allow for a the case where no type is set, and therefore there is no vocabulary from which to extract rules. For example, if there is a delete: <a class="tref internalDFN" title="document_base" href="#dfn-document_base"> insert: <a href="#dfn-document_base" title="document_base" class="tref internalDFN"> document base of http://example.org/doc and an delete: <a class="aref internalDFN" title="itemprop" href="#dfn-itemprop"> insert: <a href="#dfn-itemprop" title="itemprop" class="aref internalDFN"> @itemprop of 'title', a URI will be constructed to be http://example.org/doc#title .
  3. Otherwise, if delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary from context is not null and delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry has an entry for delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary having a delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI entry that is not null, set that as scheme . Otherwise, set scheme to vocabulary .
  4. If scheme is vocabulary return the delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference constructed by appending the delete: <a class="tref internalDFN" title="fragment-escape" href="#dfn-fragment-escape"> insert: <a href="#dfn-fragment-escape" title="fragment-escape" class="tref internalDFN"> fragment-escape d value of name to delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary , separated by a U+0023 NUMBER SIGN character (#) unless the delete: <a class="tref internalDFN" title="current_vocabulary" href="#dfn-current_vocabulary"> insert: <a href="#dfn-current_vocabulary" title="current_vocabulary" class="tref internalDFN"> current vocabulary ends with either a U+0023 NUMBER SIGN character (#) or SOLIDUS U+002F (/).
  5. If scheme is contextual , return the delete: <a class="tref internalDFN" title="uri_reference" href="#dfn-uri_reference"> insert: <a href="#dfn-uri_reference" title="uri_reference" class="tref internalDFN"> URI reference constructed as follows:
    1. Let s be delete: <a class="tref internalDFN" title="current_type" href="#dfn-current_type"> insert: <a href="#dfn-current_name" title="current_name" class="tref internalDFN"> current type name from context .
    2. If http://www.w3.org/ns/md?type= is a prefix of s , return the concatenation of s , a U+002E FULL STOP character (.) and the delete: <a class="tref internalDFN" title="fragment-escape" href="#dfn-fragment-escape"> insert: <a href="#dfn-fragment-escape" title="fragment-escape" class="tref internalDFN"> fragment-escape d value of name .
    3. Otherwise, return the concatenation of http://www.w3.org/ns/md?type= , the delete: <a class="tref internalDFN" title="fragment-escape" href="#dfn-fragment-escape"> insert: <a href="#dfn-fragment-escape" title="fragment-escape" class="tref internalDFN"> fragment-escape d value of delete: <em> s delete: </em> insert: <a href="#dfn-current_type" title="current_type" class="tref internalDFN"> current type insert: </a> , the string &prop= , and the delete: <a class="tref internalDFN" title="fragment-escape" href="#dfn-fragment-escape"> insert: <a href="#dfn-fragment-escape" title="fragment-escape" class="tref internalDFN"> fragment-escape d value of name .
delete: <div id="generate-property-values" class="section"> insert: <div class="section" id="generate-property-values">

4.5 Generate Property Values

Property value serialization makes use of subject , predicate and values .

  1. If the delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains a URI prefix that is a character for character match of predicate up to the length of the URI prefix, set vocab as that URI prefix. Otherwise set vocab to null.
  2. If vocab is not null and delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry has an entry for vocab that is a JSON Object, let registry object be that value. Otherwise set registry object to null.
  3. If registry object is not null and registry object contains key delete: <a class="tref internalDFN" title="properties" href="#dfn-properties"> insert: <a href="#dfn-properties" title="properties" class="tref internalDFN"> properties which has a JSON Object value, let properties be that value. Otherwise, set properties to null.
  4. If properties is not null, and properties contains a key, which after Generate Predicate URI expansion has a value which is a JSON Object, let property override be that value. Otherwise, set property override to null.
  5. If property override contains the key delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues , set that as method .
  6. Otherwise, if registry object con contains the key delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues , set that as method .
  7. Otherwise, set method to unordered .
  8. If method is unordered , for each value in values , generate the following triple:
    subject
    subject
    predicate
    predicate
    object
    value
  9. Otherwise, if method is list :
    1. Set value to the value returned from generate an RDF Collection .
    2. Generate the following triple:
      subject
      subject
      predicate
      predicate
      object
      value
delete: <div id="generate-collection" class="section"> insert: <div class="section" id="generate-collection">

4.6 Generate RDF Collection

An delete: <dfn title="rdf_collection" id="dfn-rdf_collection"> insert: <dfn id="dfn-rdf_collection" title="rdf_collection"> RDF Collection is a mechanism for defining ordered sequences of objects in RDF (See RDF Collections in [ delete: <a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA"> insert: <a href="#bib-RDF-SCHEMA" rel="biblioentry" class="bibref"> RDF-SCHEMA ]). As the RDF data-model is that of an unordered graph, a linking method using properties rdf:first and rdf:next is required to be able to specify a particular order.

In the microdata to RDF mapping, delete: <a class="tref internalDFN" title="rdf_collection" href="#dfn-rdf_collection"> insert: <a href="#dfn-rdf_collection" title="rdf_collection" class="tref internalDFN"> RDF Collection s are used when an item has more than one value associated with a given property to ensure that the original document order is maintained. The following procedure should be used to generate triples when an delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item property has more than one value (contained in list ):

  1. Create a new array array containing a delete: <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"> insert: <a href="#dfn-blank_node" title="blank_node" class="tref internalDFN"> blank node for every value in list .
  2. For each pair of bnode from array and value from list the following triple is generated:
    subject
    bnode
    predicate
    http://www.w3.org/1999/02/22-rdf-syntax-ns#first
    object
    value
  3. For each bnode in array the following triple is generated:
    subject
    bnode
    predicate
    http://www.w3.org/1999/02/22-rdf-syntax-ns#rest
    object
    next bnode in array or, if that does not exist, http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
  4. Return the first delete: <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"> insert: <a href="#dfn-blank_node" title="blank_node" class="tref internalDFN"> blank node from array .
delete: <div class="appendix informative section" id="markup-examples"> insert: <div id="testing" class="appendix informative section">

A. insert: </span> Testing insert: </h2>

insert: <p>

insert: <em> This section is non-normative. insert: </em> insert: </p>

insert: <p>

A test suite [ insert: <cite> insert: <a href="#bib-MICRODATA-RDF-TESTS" rel="biblioentry" class="bibref"> MICRODATA-RDF-TESTS insert: </a> insert: </cite> ] under development to help processor developers verify conformance to this specification. insert: </p>

insert: </div>
insert: <div id="markup-examples" class="appendix informative section">
insert: <h2>

insert: <span class="secno"> B. Markup Examples

This section is non-normative.

The microdata example below expresses book information as an FRBR Work item.

 <dl itemscope itemtype="http://purl.org/vocab/frbr/core#Work" itemid="http://books.example.com/works/45U8QJGZSQKDH8N" lang="en">  itemtype="http://purl.org/vocab/frbr/core#Work" itemid="http://books.example.com/works/45U8QJGZSQKDH8N" lang="en">  <dt>Title</dt> <dd><cite itemprop="http://purl.org/dc/terms/title">Just  itemprop="http://purl.org/dc/terms/title">Just  a Geek</cite></dd> <dt>By</dt> <dd><span itemprop="http://purl.org/dc/terms/creator">Wil  itemprop="http://purl.org/dc/terms/creator">Wil  Wheaton</span></dd> <dt>Format</dt> <dd itemprop="http://purl.org/vocab/frbr/core#realization"  itemprop="http://purl.org/vocab/frbr/core#realization"  itemscope itemtype="http://purl.org/vocab/frbr/core#Expression" itemid="http://books.example.com/products/9780596007683.BOOK">  itemtype="http://purl.org/vocab/frbr/core#Expression" itemid="http://books.example.com/products/9780596007683.BOOK">  <link itemprop="http://purl.org/dc/terms/type" href="http://books.example.com/product-types/BOOK">  itemprop="http://purl.org/dc/terms/type" href="http://books.example.com/product-types/BOOK">  Print </dd> <dd itemprop="http://purl.org/vocab/frbr/core#realization"  itemprop="http://purl.org/vocab/frbr/core#realization"  itemscope itemtype="http://purl.org/vocab/frbr/core#Expression" itemid="http://books.example.com/products/9780596802189.EBOOK">  itemtype="http://purl.org/vocab/frbr/core#Expression" itemid="http://books.example.com/products/9780596802189.EBOOK">  <link itemprop="http://purl.org/dc/terms/type" href="http://books.example.com/product-types/EBOOK">  itemprop="http://purl.org/dc/terms/type" href="http://books.example.com/product-types/EBOOK">  Ebook </dd> </dl> 

Assuming that delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains a an entry for http://purl.org/vocab/frbr/core# with delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI set to vocabulary , this is equivalent to the following Turtle:

 @prefix dc: <http://purl.org/dc/terms/> . @prefix md: <http://www.w3.org/ns/md#> . @prefix frbr: <http://purl.org/vocab/frbr/core#> . <> md:item (<http://books.example.com/works/45U8QJGZSQKDH8N>) . <http://books.example.com/works/45U8QJGZSQKDH8N> a frbr:Work ; dc:creator "Wil Wheaton"@en  "Wil Wheaton"@en  ; dc:title "Just a Geek"@en  "Just a Geek"@en  ; frbr:realization <http://books.example.com/products/9780596007683.BOOK>, <http://books.example.com/products/9780596802189.EBOOK> . <http://books.example.com/products/9780596007683.BOOK> a frbr:Expression ; dc:type <http://books.example.com/product-types/BOOK> . <http://books.example.com/products/9780596802189.EBOOK> a frbr:Expression ; dc:type <http://books.example.com/product-types/EBOOK> . 

The following snippet of HTML has microdata for two people with the same address. This illustrates two delete: <a class="tref internalDFN" title="item" href="#dfn-item"> insert: <a href="#dfn-item" title="item" class="tref internalDFN"> item s referencing a third item, and how only a single RDF resource definition is created for that third item.

 <p> Both <span itemscope="" itemtype="http://microformats.org/profile/hcard" itemref="home">  itemscope="" itemtype="http://microformats.org/profile/hcard" itemref="home">  <span itemprop="fn"  itemprop="fn"  ><span itemprop="n" itemscope=""  itemprop="n" itemscope=""  ><span itemprop="given-name">Princeton</span></span></span>  itemprop="given-name">Princeton</span></span></span>  </span> and <span itemscope="" itemtype="http://microformats.org/profile/hcard" itemref="home">  itemscope="" itemtype="http://microformats.org/profile/hcard" itemref="home">  <span itemprop="fn"  itemprop="fn"  ><span itemprop="n" itemscope=""  itemprop="n" itemscope=""  ><span itemprop="given-name">Trekkie</span></span></span>  itemprop="given-name">Trekkie</span></span></span>  </span> live at <span id="home" itemprop="adr" itemscope="">  id="home" itemprop="adr" itemscope="">  <span itemprop="street-address">Avenue  itemprop="street-address">Avenue  Q</span>. </span> </p> 

Assuming that delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains a an entry for http://microformats.org/profile/hcard with delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI set to vocabulary , it generates these triples expressed in Turtle:

 @prefix md: <http://www.w3.org/ns/md#> . @prefix hcard: <http://microformats.org/profile/hcard#> . <> md:item ( [ a <http://microformats.org/profile/hcard>; hcard:fn "Princeton";  "Princeton";  hcard:n [ hcard:given-name "Princeton"  "Princeton"  ]; hcard:adr _:a ] [ a <http://microformats.org/profile/hcard>; hcard:fn "Trekkie";  "Trekkie";  hcard:n [ hcard:given-name "Trekkie"  "Trekkie"  ]; hcard:adr _:a ]) . _:a hcard:street-address "Avenue Q"  "Avenue Q"  . 

The following snippet of HTML has microdata for a playlist, and illustrates overriding a property to place elements in an RDF Collection:

 <div itemscope="" itemtype="http://schema.org/MusicPlaylist">  itemscope="" itemtype="http://schema.org/MusicPlaylist">  <span itemprop="name">Classic  itemprop="name">Classic  Rock Playlist</span> <meta itemprop="numTracks" content="2"/>  itemprop="numTracks" content="2"/>  <p>Including works by <span itemprop="byArtist">Lynard  itemprop="byArtist">Lynard  Skynard</span> and <span itemprop="byArtist">AC/DC</span></p>.  itemprop="byArtist">AC/DC</span></p>.  <div itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  1.<span itemprop="name">Sweet  itemprop="name">Sweet  Home Alabama</span> - <span itemprop="byArtist">Lynard  itemprop="byArtist">Lynard  Skynard</span> <link href="sweet-home-alabama" itemprop="url"  href="sweet-home-alabama" itemprop="url"  /> </div> <div itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  itemprop="tracks" itemscope="" itemtype="http://schema.org/MusicRecording">  2.<span itemprop="name">Shook  itemprop="name">Shook  you all Night Long</span> - <span itemprop="byArtist">AC/DC</span>  itemprop="byArtist">AC/DC</span>  <link href="shook-you-all-night-long" itemprop="url"  href="shook-you-all-night-long" itemprop="url"  /> </div> </div> 

Assuming that delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry contains a an entry for http://schema.org/ with delete: <a class="tref internalDFN" title="propertyuri" href="#dfn-propertyuri"> insert: <a href="#dfn-propertyuri" title="propertyuri" class="tref internalDFN"> propertyURI set to vocabulary , delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues set to unordered with the properties track and byArtist having delete: <a class="tref internalDFN" title="multiplevalues" href="#dfn-multiplevalues"> insert: <a href="#dfn-multiplevalues" title="multiplevalues" class="tref internalDFN"> multipleValues set to list , it generates these triples expressed in Turtle:

 @prefix md: <http://www.w3.org/ns/md#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix schema: <http://schema.org/> . <> md:item ([ a schema:MusicPlaylist; schema:name "Classic  "Classic  Rock Playlist";  Playlist";  schema:byArtist ("Lynard Skynard" "AC/DC");  ("Lynard Skynard" "AC/DC");  schema:numTracks "2";  "2";  schema:tracks ( [ a schema:MusicRecording; schema:byArtist ("Lynard Skynard");;  ("Lynard Skynard");;  schema:name "Sweet  "Sweet  Home Alabama";  Alabama";  schema:url <sweet-home-alabama>] [ a schema:MusicRecording; schema:byArtist ("AC/DC");;  ("AC/DC");;  schema:name "Shook  "Shook  you all Night Long";  Long";  schema:url <shook-you-all-night-long>] )]); . 
delete: <div class="appendix informative section" id="example-registry"> insert: <div id="example-registry" class="appendix informative section">

B. C. Example delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry

This section is non-normative.

The following is an example delete: <a class="tref internalDFN" title="registry" href="#dfn-registry"> insert: <a href="#dfn-registry" title="registry" class="tref internalDFN"> registry in JSON format.

 { "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "blogPosts": {"multipleValues": "list"}, "breadcrumb": {"multipleValues": "list"}, "byArtist": {"multipleValues": "list"}, "creator": {"multipleValues": "list"}, "episodes": {"multipleValues": "list"}, "events": {"multipleValues": "list"}, "founders": {"multipleValues": "list"}, "itemListElement": {"multipleValues": "list"}, "musicGroupMember": {"multipleValues": "list"}, "performerIn": {"multipleValues": "list"}, "performers": {"multipleValues": "list"}, "producer": {"multipleValues": "list"}, "recipeInstructions": {"multipleValues": "list"}, "seasons": {"multipleValues": "list"}, "subEvents": {"multipleValues": "list"}, "tracks": {"multipleValues": "list"}  "http://schema.org/": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "blogPosts": {"multipleValues": "list"}, "breadcrumb": {"multipleValues": "list"}, "byArtist": {"multipleValues": "list"}, "creator": {"multipleValues": "list"}, "episodes": {"multipleValues": "list"}, "events": {"multipleValues": "list"}, "founders": {"multipleValues": "list"}, "itemListElement": {"multipleValues": "list"}, "musicGroupMember": {"multipleValues": "list"}, "performerIn": {"multipleValues": "list"}, "performers": {"multipleValues": "list"}, "producer": {"multipleValues": "list"}, "recipeInstructions": {"multipleValues": "list"}, "seasons": {"multipleValues": "list"}, "subEvents": {"multipleValues": "list"}, "tracks": {"multipleValues": "list"}  } }, "http://microformats.org/profile/hcard": { "propertyURI": "vocabulary", "multipleValues": "unordered"  "http://microformats.org/profile/hcard": { "propertyURI": "vocabulary", "multipleValues": "unordered"  }, "http://microformats.org/profile/hcalendar#": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "categories": {"multipleValues": "list"} } }, "http://n.whatwg.org/work": { "propertyURI": "contextual", "multipleValues": "list"  "http://microformats.org/profile/hcalendar#": { "propertyURI": "vocabulary", "multipleValues": "unordered", "properties": { "categories": {"multipleValues": "list"} }  } } 
delete: <p> delete: </p> delete: <div class="appendix informative section" id="acknowledgements"> delete: <h3> insert: </div>
insert: <div id="acknowledgements" class="appendix informative section">
insert: <h2>

B.1 D. Acknowledgements delete: </h3> insert: </h2>

This section is non-normative.

Thanks to Richard Cyganiak for property URI and vocabulary terminology and the general excellent consideration of practical problems in generating RDF from microdata.

delete: </div> delete: <div id="references" class="appendix section"> insert: <div class="appendix section" id="references">

C. E. References

delete: <div id="normative-references" class="section"> insert: <div class="section" id="normative-references">

C.1 E.1 Normative references

[HTML5]
Ian Hickson; David Hyatt. HTML5. 25 May 2011. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/html5
[MICRODATA]
HTML Microdata Ian Hickson Editor. World Wide Web Consortium (work in progress). 18 November 2011. This edition of the HTML Microdata specification is http://dev.w3.org/html5/md/. The latest edition of HTML Microdata is available at http://www.w3.org/TR/microdata/
[RDF-CONCEPTS]
Graham Klyne; Jeremy J. Carroll. Resource Description Framework (RDF): Concepts and Abstract Syntax. 10 February 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
[RDF-SCHEMA]
Dan Brickley; Ramanathan V. Guha. RDF Vocabulary Description Language 1.0: RDF Schema. 10 February 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-rdf-schema-20040210
[RFC3986]
T. Berners-Lee; R. Fielding; L. Masinter. Uniform Resource Identifier (URI): Generic Syntax. January 2005. Internet RFC 3986. URL: http://www.ietf.org/rfc/rfc3986.txt
delete: <div id="informative-references" class="section"> insert: <div class="section" id="informative-references">

C.2 E.2 Informative references

insert: <dt id="bib-MICRODATA-RDF-SUPPLEMENT">
[MICRODATA-RDF-SUPPLEMENT] insert: </dt>
insert: <dd>
insert: <cite> insert: <a href="https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-supplement/index.html"> Microdata to RDF Supplement insert: </a> insert: </cite> Gregg Kellogg Editor. World Wide Web Consortium (work in progress). 22 January 2012. insert: </dd>
insert: <dt id="bib-MICRODATA-RDF-TESTS">
[MICRODATA-RDF-TESTS] insert: </dt>
insert: <dd>
insert: <cite> insert: <a href="https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/tests/index.html"> Microdata to RDF Tests insert: </a> insert: </cite> Gregg Kellogg, Ivan Herman Editors. World Wide Web Consortium (work in progress). 22 March 2012. insert: </dd>
[RDF-SYNTAX-GRAMMAR]
Dave Beckett. RDF/XML Syntax Specification (Revised). 10 February 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210