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

On Fri, Sep 18, 2009 at 10:52 PM, Shane McCarron <shane@aptest.com> wrote:
>
>
> Jonas Sicking wrote:
>>
>> 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.
>>
>
> Andy that's fine.  We don't care.  RDFa doesn't use namespaces.  RDFa uses
> vocabularies and prefix mappings.  As long as an implementation can discover
> the prefix mappings and transl;ate vocabulary item references into those
> mappings, we are good.  As far as I can tell, that means we are good
> everywhere.

Actually, where is it defined how prefixes are mapped?

As far as I can see the XHTML+RDFa spec only defines how prefixes are
mapped in an XML document. I.e. how a serialized XML document is to be
processed.

Obviously, in the case of a HTML document we don't have a XML
document. So where is prefix mapping defined?

The question equally applies equally how to do prefix resolution in a DOM.

I suspect the intent is that mapping was intended to be defined
through the DOM since the spec asks for xmlns: prefixed attributed to
be preserved in the DOM. I think this is a good idea since the HTML5
spec defines how to map a HTML document to a DOM (the HTML parsing
algorithm). This would result in prefix mapping being defined for both
HTML documents and DOMs.

However as far as I can see the spec doesn't actually define how to do
prefix mapping in a DOM.

Or am I missing something?

/ Jonas

Received on Saturday, 19 September 2009 07:55:26 UTC