Microdata implied property order

The Microdata spec [1] has a defined property order for the JSON serialization. The (former) RDF processing rules [2] did not take this into consideration, but ordering of properties in RDF is commonly presumed, even though it doesn't exist.

If an RDF conversion were to be specified to preserve order, it should probably make use of RDF collections (rdf:List). The question would be, are single-valued properties also in a collection? If multi-valued properties are presumed to be ordered in a collection, how can you express unordered properties in Microdata?

For example (from schema.org):

	<div itemscope itemtype="http://schema.org/MusicPlaylist">
	  1. <div itemprop="tracks" itemscape itemtype="http://schema.org/MusicRecording">...</div>
	  2. <div itemprop="tracks" itemscape itemtype="http://schema.org/MusicRecording">...</div>
	</div>

There is an assumed ordering of the tracks in a playlist, but no clear processing rules (for RDF anyway) to describe the ordering. With previously existing rules, this would render the following:

	@prefix : <http://schema.org/> .
	[ a :MusicPlaylist
	  :tracks [ a :MusicRecording; ...], [a :MusicRecording; ...]
	]

RDFa recently added the @inlist attribute to indicate that property values should be added to a list, so the same thing could be represented as follows:

	<div vocab="http://schema.org/" typeof="MusicPlaylist">
	  <div rel="tracks" inlist>
	    1. <div typeof="MusicRecording">...</div>
	    2. <div typeof="MusicRecording">...</div>
	  </div>
	</div>

which would render the following:

	@prefix : <http://schema.org/> .
	[ a :MusicPlaylist
	  :tracks ([ a :MusicRecording; ...] [a :MusicRecording; ...])
	]

Gregg

[1] http://dev.w3.org/html5/md/#json
[2] http://www.w3.org/TR/2011/WD-microdata-20110525/#rdf

Received on Sunday, 2 October 2011 17:14:40 UTC