Indrajit Bhattacharya wrote:
Hi Dave,
Thanks for your reply.
Please see the function below, which transforms a xerces document
successfully. Please provide your comments whether its okay or not.
I am having two problems though:
1. It crashes when I uncomment XMLPlatformUtils::Terminate(); at the end
of the function.
That's because you still have Xerces-C and Xalan-C objects still in
existence. You need to make sure everything has been destroyed before you
call XalanTransformer::terminate() and PlatformUtils::terminate(). If you
look carefully at the sample applications, you'll see how they ensure that.
2. I see there is one extra blank line added to every line in the output
file (trans.xml), which I need to avoid.
Without seeing the source document or the stylesheet, it's impossible to
say. Please try to reproduce the problem with a _minimal_ source document
and stylesheet and post the documents.
Dave