[xslt] xsltSaveResultToFilename doesn't save?



Title: xsltSaveResultToFilename doesn’t save?

Hello,
I generate a xml file. Then apply a stylesheet and save the result in a HTML doc. I use the below code:


xmlDocPtr XMLdoc = xmlParseFile(XMLFName);
XSSheet =  xsltParseStylesheetFile((const xmlChar *) IndexXSLPath.c_str()); //current style sheet
if(XSSheet){
        wxLogMessage (_T("successful index xlssheet"));
        ResXMLDoc = xsltApplyStylesheet(XSSheet, XMLdoc, NULL); //3rd = parameters     
        SuccessfulIndexHTML = xsltSaveResultToFilename(HTMLIDXFNAME, ResXMLDoc, XSSheet, 9);//last param is compression level

wxLogMessage(_T("Success of index HTML generation: %d"), SuccessfulIndexHTML);
        xsltFreeStylesheet(XSSheet);
        xmlFreeDoc(ResXMLDoc);
}


It applies and saves the HTML file, but the HTML content is garble, no character is a readable one. The file size reported from the log file is 467, but when checked from the filesystem it is 325. I used xsltproc to process the xml and the xsl and the output is a perfect one. Earlier in the code, I generate and save the xml file.

This c++ code and xsl works under MSW. I have the mentioned trouble under linux.
Versions:
Linux suse 8.0
libXml: 2.5.8
libXslt: 1.0.31

Any help on sorting out this is appreciated.

Thanks in advance,
Joseph Jude
________________________________________

Feature-rich album creation tool
http://www.jjude.com/apps/fow.html



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