finally a bnode with a uri

Adding (partial) RDFa support to the Firefox HTML Validator extension

Improving QA issues caused by RDFa
Update (2008-04-24): I managed to get rid of the xmlns-related errors (.replace() to the rescue ;), so the extension now accepts markup that follows the latest RDFa DTD (including @typeof). And while at it, I created versions for win and mac.

One of the reasons I haven't been using RDFa in production is the problem of quality assurance (a.k.a. plain old html validation). Not because RDFa isn't valid markup as such, but the main tool I'm using during development is Marc Gueury's excellent HTML Validator Extension for Firefox. RDFa is valid XHTML+RDFa, but XHTML+RDFa is not HTML, so the extension reports dozens of errors starting with the unrecognized Doctype declaration. The W3C Markup Validator supports RDFa, but I often develop while I'm offline, or on a non-public Web server, and the little "0 errors / 0 warnings" message in the status bar is more convenient than having to send markup to an online service.

Yesterday, however, I started working on an RDFa generator for one of Intellidimension's projects (Very interesting to see them use RDF big time, while many of us are still experimenting and thinking about potential markets, BTW). So, now that the RDFa-caused messages made it almost impossible to spot real HTML errors, I wondered if the add-on could perhaps be hacked to accept RDFa as well. Long story short: It can, to a certain extent. I don't know if arbitrary XML namespace prefixes (xmlns:foo="...") can be supported by a pure DTD/SGML-based validator (the FF extension uses openSP). FWIW, I couldn't get it to work.

Apart from that, RDFa-enabling the extension was mainly copying the RDFa DTD and a set of modules to the plug-in's SGML library. It now happily accepts RDFa attributes (about, resource, property, datatype, content, etc) and makes my life a little bit easier. If anyone has an idea how I could make it accept (non-predefined) namespace prefixes as well, I'd appreciate hints.

The tweaked extension is so far just a hack. I didn't even ping Marc yet or change the internal ID, so any extension update will remove the RDFa functionality. You can try/download it if you like (windows version), but I may have to take it offline should Marc not be happy about the re-distribution.

Comments and Trackbacks

Firefox HTML Validator mit RDFa - Support (Trackback):
Nachdem sich Benjamin Nowack gestern (via twitter) noch gefragt hat ob es m�glich ist, einem Firefox-HTML-Validator RDFa beizubringen " wondering if the FF HTML Validator extension could be hacked to support RDFa. Basic QA is a bit too compl...
Trackback from "notizBlog - a private weblog written by Matthias Pfefferle" on 2008-04-24 11:24:12 UTC
HURRAY! I take it you've submitted patches in all of the usual places?
Comment by Daniel O'Connor on 2008-04-28 08:22:38 UTC
Daniel, yes, Marc already asked for a diff, he may add the stuff to the official add-on. The current xmlns support is a bit too hack-ish, but maybe he knows a smarter way of adding it.
Comment by Benjamin Nowack on 2008-04-30 09:21:51 UTC
>The current xmlns support is a bit too hack-ish Does it support the @prefix alternative mapping definition?
Comment by Nick Lewis on 2008-12-18 12:54:18 UTC
Nick, I'm not aware of an alternative syntax for namespace declarations, but when it's in the RDFa DTD, then it should be supported. (The main problem is that the validator is based on DTDs, but the generic xmlns mechanism can't be encoded in DTDs.)
Comment by Benjamin Nowack on 2008-12-20 15:09:50 UTC
0 comments are currently in the approval queue.

Comments are disabled for this post.

Earlier Posts

Later Posts


No Posts found