Helma wrote:
Carsten Ziegeler said the following on 23/5/07 21:43:
If I see this correctly, the difference between the two solutions is
that in the not working case, the DOMBuilder is used to build the DOM
whereas in the working case, the serializer is used and the result is
then parsed again.
As Marc said, you're right.
As you suggested offline I've tried serializing the output of the
pipelineUtil.toDOM to a file and do a diff. The result is: the files are
identical except that elements with multiple attributes have a different
order of the attributes.
Just to be sure that I didn't disguise any errors by the way I saved the
files, here's what I did [1].
Notes:
- pipeline is simple xml-generator + xsl-transformer + xml-serializer,
all default stuff. The only thing different is the parameter of
namespace prefix=true in cocoon.xconf for the xml-parser.
- BTW this leads to NAMESPACE PREFIX!!!!!!!!!!!!!!!!!!!!!!!!!! lines in
the console. Is that what you were referring to in your other post?
Yes, exactly that :) This has been removed in latest versions of
excalibur xmlutils (but apart from that debug msg the versions are
identical).
So unless I have done the process of saving wrong, I don't see a
difference between the two files.
Hmmm, I'm not sure again, but I think the dom streamer is rather tricky
and does some magic behind the scenes with namespace nodes. But I might
be mistaken.
Actually you have to compare the resulting dom trees, the one from the
pipelineutil and the one from the parser.
I would suggest streaming them with the usual jaxp stuff and not use the
domstreamer for this.
Carsten