Hi all,

I'm a new dom4j user and have a question I could not find an answer for from
the api or other documentation.

I have a fairly classical situation where I have a "database" type XML file
(large, up to .5GB) that has a root node that has a set or child, record
nodes. I need to apply XSLT transformations to this document, which I'm
acchieving efficiently by utilizing the excellent ElementHandler interface.
I apply the stylesheets to a chunk of records at a time, serialize the
results and move on to the next chunk. This seems to work fine, but I hit a
problem with the root node, which I also need to style.

The root node has some namespace definitions that are causing me grief. If I
print out the transformed root node with asXML() the namespace definitions
are still there, but when I use the writeOpen(rootElement) method in the
XMLWriter class to serialize the output, it is missing the namespace
definitions. Is there something special I need to do to have the namespaces
included when calling writeOpen()? The api doc says that attributes would be
included in the writeOpen() output, but what about namespace definitions?
Are they left out on purpose and if so, how can I have them included in my
output?

I've tried this with two separate daily builds, the latest I downloaded
yesterday (4/30/02).

Hope I made some sense, any help appreciated.


Thanks,

Terry

Reply via email to