Hi Petr!
On Aug 04, 2006, at 23:23, via RT wrote:
Show quoted text> 1) I reimplemented this method. Previously, getElementsById was just
> findnodes("id('$id')"), which has some overhead unnecessary overhead,
> which becomes apparent if the method calls are extremely frequent.
>
> 2) I added $attr->isId DOM Layer 3 method
That's very good news, thanks!
Show quoted text> 3) make getAttribute/setAttribute/hasAttribute/getAttributeNode/...etc
> now work with full attribute names rather than just localnames (sic!).
>
> Although DOM Level 3 spec is not very clear about the behavior of
> these methods for attributes in a namespace, it certainly does not
> imply that getAttribute('foo') should return value of a bar:foo, which
> was the old behavior.
I agree that the DOM is not as clear as it could be on these, and
after having spent quite a long while working on specifications
related to it I am happy to help if you have any doubts on any part
of it. You are entirely correct that the non-NS methods shouldn't
return attributes based on their local names, they should return them
based on their qualified names (i.e. the .nodeName property).
Show quoted text> 4) all NS variants of these methods should now also work correctly for
> attributes without namespace if nsURI is undef (as required by the
> specs)
Does it work the same for the empty string and for undef? There is no
normative binding for Perl, but I think that the two should behave
the same. More importantly, if .namespaceURI returns undef when
created with an undef namespace, it should still return undef when
created with an empty string namespace. Likewise for elements. The
normalisation is important for interoperability. I can investigate
further into test cases if you have doubts.
Dahut, and thanks a *lot* for maintaining this very essential module!
--
Robin Berjon
Senior Research Scientist
Expway,
http://expway.com/