Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4
-
None
-
None
-
Operating System: Other
Platform: Other
-
11504
Description
A user reports that trying to process a hand-generated DOM2 tree is failing
unless he generates explicit namespace declaration attributes. That wouldn't
surprise me, but In Theory it shouldn't be necessary; we ought to be able to
recognize the namespace and prefix fields of the DOM nodes as implying a
declaration (just as DOM serialization to XML syntax would).
Doing this in DOM2DTM is possible but a bit ugly; it's basically the same issue
as the implied declaration for xml: which we're now synthesizing as an
"imperfect" DOM node.
However, there are some complications here. In particular, it's possible for the
implied declarations on an element and on one of its attributes to conflict. The
DOM Level 3 WD has a proposal for a namespace normalization process which deals
with this – but it reserves the right to change prefixes when necessary to
reconcile this, and it's really unclear that Xalan ought to do so.
So the proper answer may, in fact, be to say that the DOM must be
namespace-normalized before submitting it to Xalan... or to do what fixup we
can, and throw an error if we hit a conflict we can't work around.
(IBMers: See forums.software.xml discussion, today, for context.)