Jukka Zitting wrote:
Hi,
Sylvain Wallez wrote:
I encountered the same problem and tracked it up to finding that DOMWalker uses an identity transformation from a StreamSource to a DOMResult to parse builtin_nodetypes.xml. Creative use of JAXP :-)
You are probably right about this being the problem.
I'm a big fan of the Transformer interface, but then again I usually work with non-namespaced documents. I didn't realize that this might cause problems with namespaces, but now that you mentioned it this seems like a good explanation for the problems.
I suspect some implementations of the StreamSource -> DomResult identity transform to use a SAX parser piped to a DOM builder. And a SAX parser doesn't report namespace declarations as attributes unless the "http://xml.org/sax/features/namespace-prefixes" property is true, whereas its default value is false (see ContentHandler's javadoc). So in such cases, the DOM builder receives all start/endPrefixMapping events, but not xmlns: attributes.
Sylvain||
-- Sylvain Wallez Anyware Technologies http://apache.org/~sylvain http://anyware-tech.com Apache Software Foundation Member Research & Technology Director
