- From: Jonas Sicking <jonas@sicking.cc>
- Date: Fri, 18 Sep 2009 16:16:51 -0700
- To: Shane McCarron <shane@aptest.com>
- Cc: Manu Sporny <msporny@digitalbazaar.com>, HTMLWG WG <public-html@w3.org>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
On Fri, Sep 18, 2009 at 10:51 AM, Shane McCarron <shane@aptest.com> wrote: > I just wanted to chime in on one aspect of your comments: > > Jonas Sicking wrote: > > The complexity argument aside, I'm also not fully understanding the > processing model with regards to xmlns prefixed attributes. Is it > intended that consuming RDFa in HTML documents should be done without > looking at the namespace of attributes? I.e. that DOM Level 1 methods > should be used? I'm asking because HTML5 parsing currently requires > that attributes whose name start with "xmlns:" are parsed into the > null namespace, and with the localName containing the for example > "xmlns:foo". However in an XHTML document, parsing xmlns prefixed > attributes result in attributes in the in the > "http://www.w3.org/2000/xmlns/" namespace with a localName of for > example "foo". > > > Actually... this confuses me. According to the DOM Level 2 Core spec and > the DOM Level 3 Core spec, attributes that declare XML Namespace mappings > are directly manipulatable using DOM Level 1 methods [1] [2]: The problem is that the way HTML parsing works, markup like: <div xmlns:foo="http://namespace.example.org"> Does not parse the xmlns:foo attribute into something that "declare [an] XML Namespace mapping". Specifically, it does not create an attribute in the "http://www.w3.org/2000/xmlns/" namespace. Or an attribute with a "xmlns" prefix and "foo" localName. It creates an attribute in the null namespace, with a localName that is "xmlns:foo". So *an* attribute shows up in the DOM. Just not an attribute that declares a XML Namespace. Now, we can argue if that is how HTML5 should define parsing. But that is how it currently defines it. And as far as I can see the HTML+RDFa spec does not seem to change that. / Jonas
Received on Friday, 18 September 2009 23:18:03 UTC