[xml] libxslt and source document modification



Hi,

I'm using libxml2-2.3.9 and libxslt-0.10.0 on a Solaris 8 box.

I'm using libxslt to transform an XML document into readable formatted
text, that part appears to be working fine. However, after I've done the
transformation I save my original XML document away (using
xmlSaveFileEnc) and find that the DOCTYPE declaration from my document
has disappeared along with some empty text nodes.

1. Why does libxslt modify the source document? I can partially work
around this by copying the document recursively for each transformation,
but that would be slow and awkward (especially when I want to transform
document fragments rather than whole documents).
2. If libxslt must modify the original source document, why is it
causing the DOCTYPE declaration to disappear?

I'm happy to start debugging and tracing, but I just thought that
I would check if this was a known problem first.

Gary






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]