Dear Thomas,

> It looks similar to the problem yesterday, but we fixed that 
> one by changing our code like you suggested, so that we "did 
> it right". We didn't want the Serializer to *fix* something 
> that we "did wrong", so we did not turn the namespace fixup on there.
> 
> So, you are saying that the Serializer has to fix this one. 
> So, is Xalan doeing something wrong then?

The Xalan remark in the bugzilla entry you mentioned yesterday do not
apply here, you do not use an identity transformer, Xalan is not
involved in your code.

Plus, what I said yesterday was just to fix your program that already
had added namespace attributes code, I did not say that you had to do
that.

It is just that you can have a DOM with or without namespace attributes.
If you create it through DOM operations (createElementNS) you usually
don't have them by default, as you would have to create them yourself.
That is okay as long as your DOM is a DOM, in DOM the the namespace
information is stored 'on' the nodes, so it does not need to have
namespace declaration attributes to function.
When you serialize it for use elsewhere, namespace attributes do have to
be present for the document to be namespace wellformed. There are
several ways to fix it:
 - Make sure the namespace declaration attributes are present in the
DOM, e.g. by adding them as you did yesterday.
 - Get a 'smart' serializer like the one Xerces has, and let it add the
namespace attributes in the output during serialization for you, since
the information is in the DOM, just differently. The only problem you
had was that in Xerces 2.0.1 namespace fixup was on by default, in
Xerces 2.4.0 you have to turn it on yourself.

So, in your other code you can just get rid of the namespace declaration
attributes setting code, as long as you tell the serializer to add them
for you in the serialized output.

Kind regards,

--Sander.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to