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

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

From: Shane McCarron <shane@aptest.com>
Date: Tue, 22 Sep 2009 16:37:47 -0500
Message-ID: <4AB943AB.4070601@aptest.com>
To: Toby Inkster <tai@g5n.co.uk>
CC: Jonas Sicking <jonas@sicking.cc>, 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>

Toby Inkster wrote:
> 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).
Yes, exactly.  Another strategy is to walk up the tree discovering 
prefix declarations.  I have a sample implementation that does this and 
caches the results so that it is not super-inefficient.  It just depends 
on what you are trying to accomplish.  There's a version of that library 
in the XHTML2 wiki at [1].

[1] http://www.w3.org/MarkUp/xhtml2/wiki/CurieJavascript

Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com
Received on Tuesday, 22 September 2009 21:39:04 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:57 UTC