You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Christian Aberger <xm...@Aberger.at> on 2001/04/05 08:31:19 UTC
RE: XALAN-C++ Is there anu way to Seperate the parsing ofStylesheet and applying it to XML document.
Hi,
Please study the CompileStylesheet sample. It works, and I use this way in
my code also, except the way exceptions are handled ... ;-)
Don't understand your problem, can't see it from only 3 lines of code you
sent. Propably your objects go out of scope after you precompiled them,
check which object owns these.
wfr ChrisA
-----Original Message-----
From: Avula, Raj [mailto:RAvula@firstam.com]
Sent: Donnerstag, 05. April 2001 00:30
To: 'xalan-dev@xml.apache.org'
Subject: XALAN-C++ Is there anu way to Seperate the parsing ofStylesheet
and applying it to XML document.
Hi,
I am trying to basically seperate the processing of stylesheet and
the processing of XML document.
I want to parse the stylesheet first and store the XSLTEngineImpl Object in
the memory. As soon as request
comes for transformation, it has to apply the already parsed stylesheet to
the given XML file. I want to basically
save the parsing time of XSL.
I am getting error, if I try to seperate these two. In my code I am
creating all the support objects like
StylesheetConstructionContextDefault, StylesheetExecutionContextDefault,
XSLTEngineImpl etc.. and
processing the stylesheet using
StylesheetRoot* const theStylesheetRoot =
s_pProcessor->processStylesheet( theStylesheetSource,
theConstructionContext);
s_pExecutionContext->setStylesheetRoot(theStylesheetRoot);
In the second function I am creating InputSource and ResultTarget and
calling
s_pProcessor->process( theInputSource,
theResultTarget,
*s_pExecutionContext);
At this point I am getting Exception.
If I do the same thing in one function I am getting the desired result.
I am using XALAN C++ vesion.
Can any body help me?
Thanks & Regards,
Raj.