Re: FPWD Review Request: HTML+RDFa

On Thu, 03 Sep 2009 13:40:14 +0200, Mark Birbeck  
<mark.birbeck@webbackplane.com> wrote:
> 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.

I'm not sure how this point is relevant. At least from where I'm sitting  
the DOM generated from both text/html and text/xml byte streams has  
support for namespaces.


> 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.

Yes, but xmlns:<prefix> has special semantics in XML.


> 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.

I still think it is wrong to treat xmlns as an arbitrary attribute while  
it clearly is not so. Especially since the properties of an xmlns  
attribute differ between a DOM generated from a text/html stream versus a  
text/xml stream. In the latter case the attribute is in a namespace,  
http://www.w3.org/2000/xmlns/.

Treating xmlns as any other attribute seems like a violation of the  
architecture of Namespaces in XML to me. I.e. a layering violation.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Thursday, 3 September 2009 12:07:06 UTC