From c58e1d1d40e4be6df2aaaa4675bda311434b6d47 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg RDFa
The algorithm to convert a Microdata item to RDFa is as follows:
vocab
attribute,
- whose value is the vocabulary identifier for the item.typeof
attribute
- whose value is local type.span
child element to the element that represents the item,
- with the attribute rel="rdf:type"
- and a resource
attribute whose value is extra type.property
attribute with the same valueabout
attribute with the same valueid
reference,
- with a vocab
attribute whose value is the vocabulary identifier for the item.
- The choice of element is left to the author, to provide sufficient flexibility - to avoid unwanted changes in the rendering of the content.
+vocab
attribute, whose value is the vocabulary identifier for the item.typeof
attribute whose value is taken from the values of itemtype where each type is made relative to vocabulary identifier, ensuring that the element has a typeof
attribute with at least an empty value..
id
reference has no resource
attribute,
- add a resource
attribute whose value is a NUMBER SIGN U+0023 followed by reference
- to the element.id
reference has no typeof
attribute,
- add a typeof="rdfa:Pattern"
attribute to the element.link
child element to the element that represents the item,
- with a rel="rdfa:copy"
attribute and an href
attribute
- whose value is a NUMBER SIGN U+0023 followed by referenceresource
attribute having the same value.typeof
+ attribute with at least an empty value.object
element having both an
+ itemprop and a data
attribute, change
+ the data
attribute to a
+ resource
attribute with the same valueproperty
attribute with the same valuevocab
attribute taken from the element and its
+ ansestors.id
reference,
+ with a vocab
attribute whose value is item vocab, and a typeof
attribute with rel="rdfa:Pattern"
attribute.
+ The choice of element is left to the author, to provide sufficient flexibility + to avoid unwanted changes in the rendering of the content.
+link
child element to the element that represents the item,
+ with a rel="rdfa:copy"
attribute and an href
attribute
+ whose value is a NUMBER SIGN U+0023 followed by referenceAnd then remove the itemref attribute.
And then remove the itemref attribute.
There is significant scope for optimising this algorithm, which may result in redundant vocab