Patterns

From RDFaWiki

Jump to: navigation, search

Structured Values: an example specifying units

RDF model only supports binary relations. However, in some cases it is necessary to represent information involving higher arity relations. In particular, in some cases one of the parts of the structured value is thought of as the "main" value, with the other parts qualifying the main value. For instance, the length of the word "interfenestration" is 17 characters i.e. the value is 17 and the unit is character. In RDF this is done using rdf:value for instance:

<#interfenestration>   example:size   _:a .
_:a         rdf:value        "17"^^xsd:decimal .
_:a         example:unit    "character" .

Using implicit blank nodes in RDFa one could write:

  The word "interfenestration" has
  <span about="#interfenestration" rel="example:size">
      <span property="rdf:value">17</span>
      <span property="example:unit">character</span>s.
  </span>