W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > September 2009

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

From: Toby Inkster <tai@g5n.co.uk>
Date: Tue, 22 Sep 2009 22:35:06 +0100
Message-Id: <869019E0-B126-43F6-AFAB-1126D09A6999@g5n.co.uk>
Cc: Shane McCarron <shane@aptest.com>, Henri Sivonen <hsivonen@iki.fi>, Mark Birbeck <mark.birbeck@webbackplane.com>, HTMLWG WG <public-html@w3.org>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
To: Jonas Sicking <jonas@sicking.cc>
On 22 Sep 2009, at 22:14, Jonas Sicking wrote:

> I think I found the code that extracts prefix mappings, and it appears
> that it uses method 3. So my question is, why is this more correct
> than any of the other 4 methods i proposed?

I think you'll probably find that they all use "none of the above".  
None of the five methods you outlined match the method suggested  
(though not required - any other technique that produced the same end  
result is allowed) by the RDFa Syntax recommendation.

The method suggested would be to check the current element for  
attributes whose first six characters match "xmlns:". No walking  
ancestor elements is needed if you follow the algorithm suggested by  
the recommendation.

Exactly how to find these attributes which match those six characters  
is left up to the developer of the implementation - the developer  
will choose whichever method is most appropriate for the environment  
the implementation is expected to be run on. In terms of the DOM,  
I've found looping through the Node.attributes collection and  
checking the name property of each to be an effective method. That's  
the method I've used in Javascript and in Perl (libxml).

Toby A Inkster
Received on Tuesday, 22 September 2009 21:35:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:05 UTC