DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5944>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5944

transform API not reusable after one transformation?!

           Summary: transform API not reusable after one transformation?!
           Product: XalanC
           Version: 1.3.x
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Hi, 
I was wandering whether had a similiar problem of integating the c++ API of 
xalan into your own program... at present i am using xalan C++ ver. 1.3 for my 
own application, following what is written on the usage pattern in the website 
(http://xml.apache.org/xalan-c/usagepatterns.html#xalantransformer). it managed 
to complied and intergrated into my program. 
however, there are few problem occurs... it seems during run time, if i was 
trying to call this function (or choose this option in my application) more 
than once it will crash my program instantly. i have tried and taken the 
XMLPlatformUtils::Terminate() out of the program, yes this allows me to call 
the function more than once but further problem developes as it will crash at 
random. 

i was wandering whether there is a fault with the way I have written the 
application or something, i will be grateful if someone will be kind enough to 
help ou
Many Thanks
kit

Here are the code of my application...

The function for xslt transformation

void xml_output_conversion()
{
        XMLPlatformUtils::Initialize();
        XalanTransformer::initialize();

        XalanTransformer theXalanTransformer;

        XSLTInputSource xmlIn("Results/results.xml");
        XSLTInputSource xslIn ("xsltres2.xsl");
        XSLTResultTarget xmlOut ("Results/results.html");

        int TheResulT= theXalanTransformer.transform(xmlIn, xslIn, xmlOut);
        
     XMLPlatformUtils::Terminate();
        /*XalanTransformer::terminate() is responisble Terminate Xalan*/
         XalanTransformer::terminate();

         

   return;
}

and the function responsible of calling this function...

void opt_xml_to_html()
{
xml_output_conversion();
    cerr << "Files are created, please go and look it up in the Results 
Directory\n";     

return;
}

Reply via email to