W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: Request to publish HTML+RDFa (draft 3) as FPWD

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 18 Sep 2009 16:16:51 -0700
Message-ID: <63df84f0909181616p189e22ebse185abbbcc48981b@mail.gmail.com>
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:17:52 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:51 UTC