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

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:05 UTC