libxslt - XSLT: xsltApplyStylesheet returns null -


i've xml , xsl file. output xsl text i.e if conditions fail, result description of failure. if conditions pass, result null. if run in xsltproc, works fine.

however, if run using libxslt using function xsltapplystylesheet, see empty result. input xml xsltapplystylesheet created dynamically in code. xsl file read using xsltparsestylesheetfile. (i used xmldocdumpformatmemory of both xml , output of xsltparsestylesheetfile->doc, both seems fine). tried xsltsaveresulttostring after applystylesheet, doesn't work well.

what possible issue here?

code snippet:

  xmldoc = xmlnewdoc(bad_cast "1.0");   c = xmlnewnode(null, bad_cast "company");   xmladdchild(c, node);  //node child in xml   xmladdchild(c, d);  //d child in xml   xmldocsetrootelement(xmldoc, c);   .....    xsl = xsltparsestylesheetfile("xsl.file");   ....   output = xsltapplystylesheet(xsl, xmldoc, null);   ....   //output has "<?xml version="1.0"?>" 

tia , appreciate help!

use xmldocdumpmemory save file in a similar question before applying stylesheet, , see if works.

references


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -