- From: Mark Birbeck <mark.birbeck@webbackplane.com>
- Date: Thu, 3 Sep 2009 12:40:14 +0100
- To: Anne van Kesteren <annevk@opera.com>
- Cc: Manu Sporny <msporny@digitalbazaar.com>, HTML WG <public-html@w3.org>, RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
Hi Anne, Thanks for your feedback. You wrote (in response to Manu): >> RDFa does depend on xmlns:<prefix>, but only to the point where the RDFa >> processor must be able to extract the prefix/value pair from the DOM in >> some way. Would specifying the mechanism on how to extract it from an >> HTML DOM as well as an XHTML DOM address the issue? > > I don't think so as it would violate one of the more important design > principles the HTML WG has, namely that of DOM consistency. > > It also seems somewhat like a layering violation to care about xmlns > attributes rather than namespace/prefix mappings. I wonder why that has not > come up as an issue with RDFa in XHTML. This does seem to cause a lot of confusion, but it really is the case that RDFa does not require namespace support from the DOM. All that an RDFa parser needs to know is what the mapping is between some token and its full URI, and it really doesn't care whether the mechanism to do this is: prefix="dc http://purl.org/dc/terms/" or: prefix="dc=http://purl.org/dc/terms/" or: prefix-dc="http://purl.org/dc/terms/" or: xmlns:dc="http://purl.org/dc/terms/" In short, as long as an RDFa parser can get the token and the URI, all is well. In the first two scenarios the token comes out easily from the attribute's value, and in the second two scenarios the token is obtained by parsing the attribute's name. But either way, from an RDFa parser point of view, this is all we need. Now you'll note that since all we are doing is cracking open the attribute name to obtain 'dc' from 'xmlns:dc', we don't care whether the DOM supports namespaces or not. Provided that the node interface supports the attributes property, and the element interface supports the getAttribute() method (i.e., that we have at least DOM1 support), then an RDFa parser can be written in JavaScript. So hopefully that shows why there isn't really a layering issue in the way that you say, because we're not interested in namespace support in the DOM, at all. Regards, Mark -- Mark Birbeck, webBackplane mark.birbeck@webBackplane.com http://webBackplane.com/mark-birbeck webBackplane is a trading name of Backplane Ltd. (company number 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street, London, EC2A 4RR)
Received on Thursday, 3 September 2009 11:41:01 UTC