Skip to content

blank nodes rdfa notes

apseyed edited this page Jul 22, 2013 · 8 revisions

http://www.w3.org/TR/rdfa-lite/

http://www.w3.org/TR/rdfa-syntax/#s_blankNodes

<link about="_:john" rel="foaf:mbox"
  href="mailto:john@example.org" />

<link about="_:sue" rel="foaf:mbox"
  href="mailto:sue@example.org" />

<link about="_:john" rel="foaf:knows"
  resource="_:sue" />

http://www.w3.org/TR/xhtml-rdfa-primer/

Note how Alice did not specify a resource like she did when adding blog entry metadata. But, if she is not declaring what she is talking about, how does the RDFa Processor know what she's identifying? In RDFa, in the absence of a resource attribute, the typeof attribute on the enclosing div implicitly sets the subject of the properties marked up within that div. That is, the name, email address, and phone number are associated with a new node of type Person. This node has no URL to identify it, so it is called a blank node as shown on the figure:

<div vocab="http://xmlns.com/foaf/0.1/" typeof="Person"><p>
  
<p>
    <span property="name">Alice Birpemswick</span>,
    Email: <a property="mbox"
href="mailto:alice@example.com">alice@example.com</a>,
    Phone: <a property="phone" href="tel:+1-617-555-7332">+1 617.555.7332</a>
  </p>
</div>

Clone this wiki locally