Re: ISSUE-41/ACTION-97 decentralized-extensibility

On Mon, 2009-10-05 at 15:09 +0300, Henri Sivonen wrote:

> I think a stronger argument for why RDFa (or Microdata for that  
> matter) is inappropriate for this use case is that the RDF graph  
> represented by RDFa doesn't have data model-level correspondence to  
> particular elements in the DOM even though syntactically the graph and
> the DOM are overlaid.

RDF does have a model-level correspondence to particular elements in the
DOM - it's just one that needs to be "triggered" explicitly rather than
implicitly. To make RDF statements about an element, you give the
element an 'id' attribute. This assigns a URI to that element, which you
can use in triples.

For example:

 <div xmlns:foaf="http://xmlns.com/foaf/0.1/" typeof="foaf:Person">
  <h1 property="foaf:name">Bob</h1>
  <p>Bob's interests are...</p>
  <ul rel="foaf:interest">
   <li><a href="#foo">Foo</a></li>
   <li><a href="#bar">Bar</a></li>
  </ul>
 </div>
 <div id="foo" about="#foo">
  <h2 xmlns:core="http://purl.org/dc/terms/" property="core:title">Foo</h2>
  <p>... foo ...</p>
 </div>
 <div id="bar" about="#bar">
  <h2 xmlns:core="http://purl.org/dc/terms/" property="core:title">Bar</h2>
  <p>... bar ...</p>
 </div>

However, while this shows that the RDF graph can correspond to DOM
elements when it wants to, I don't think RDFa is the answer to the
problem of more generalised decentralised extensibility.

To solve this more general problem, I do think that adopting XML's
namespacing for elements and attributes into the HTML serialisation
would be a good solution. Not only would it give us a flexible
decentralised extensibility mechanism, but also it would reduce
unnecessary differences between the XHTML and HTML serialisations, which
is surely a big win.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 5 October 2009 12:36:30 UTC