W3C home > Mailing lists > Public > public-rdfa@w3.org > February 2009

Re: RDFa and Web Directions North 2009

From: Ben Adida <ben@adida.net>
Date: Sun, 15 Feb 2009 09:35:48 -0800
Message-ID: <49985274.4070201@adida.net>
To: Toby A Inkster <tai@g5n.co.uk>
CC: RDFa <public-rdf-in-xhtml-tf@w3.org>, rubys@intertwingly.net, public-rdfa@w3.org, ian@hixie.ch
Toby A Inkster wrote:
> There are theoretical objections to using xmlns:* attributes for RDFa in
> HTML. I understand them and mostly agree. It would be good to find a
> solution to these. But the practical problems are really minimal - once
> a stream of bytes has been turned into a DOM tree (and that is where the
> major differences between XHTML and HTML processing lie), the DOM tree
> can be processed as RDFa using the same algorithm for both XHTML and HTML.

That is exactly my experience, too.

The built-in parsing of xmlns:* in existing browsers may vary depending
on the mime type, but it's trivial to bypass this inconsistency if you
want to.

For example, the JavaScript RDFa library and bookmarklets [1] "just
work" on any DOM object, whatever the mime type. They have no trouble
pulling xmlns:* out of an HTML DOM.

Here's the proof: I took Henri's page, and added one <p> with RDFa that
uses the "dublincore" prefix that Henri defined, and another <p> with
the inlined RDFa bookmarklet so you can click the link and automatically
extract the triples live in your browser:



Same bytes, different mime types, live parsing *in your browser*
producing the same RDF triples.

(Works on Safari and Firefox, not on IE because I haven't debugged my
JavaScript there lately.)

Like Toby, I understand and am sympathetic to the objections regarding
the use of xmlns:* in an HTML document. That said, it's interesting to
note that the problem is not one of technical feasibility. It's pretty
easy to make it work, actually.


[1] http://www.w3.org/2006/07/SWD/RDFa/impl/js/
Received on Sunday, 15 February 2009 17:36:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:03 UTC