Hi,

I'm absolutely fine with only supporting DOM Level 2, but
one thing is missing in the DOMBuilder: the support for
namespaces.
The namespaces (with their prefixes) are reported by
the startPrefixMapping() event. The DOM however needs
the namespaces as attributes at the element.
So the attached patch records the namespaces with their
prefixes whenever a startPrefixMapping() is called and
appends the special xmlns attributes during startElement
to the next incoming element.
This patch is required as the parser might not add the
namespace attributes to the element by itself.
We had this problem in Cocoon with the Cocoon DOMBuilder
and it took us some time to find out where the problem
was. So this patch is actually from "borrowed" from Cocoon
and should solve all the remaining problems.

Regards,
Carsten

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 03, 2002 9:31 PM
> To: [EMAIL PROTECTED]
> Subject: DO NOT REPLY [Bug 5528] - DOMBuilder mixes DOM Level 1 and 2
> 
> 
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5528>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
> INSERTED IN THE BUG DATABASE.
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5528
> 
> DOMBuilder mixes DOM Level 1 and 2
> 
> [EMAIL PROTECTED] changed:
> 
>            What    |Removed                     |Added
> ------------------------------------------------------------------
> ----------
>            Severity|Critical                    |Enhancement
> 
> 
> 
> ------- Additional Comments From [EMAIL PROTECTED]  2002-01-03 
> 12:30 -------
> Checked in the simple fix (assume DOM Level 2). Adding DOM1 
> support is, I think, 
> an Enhancement.

Attachment: DOMBuilder.diff
Description: Binary data

Reply via email to