a external lib funktion write to stdout i see on debug mode this...
cur = xsltParseStylesheetFile( (const xmlChar*)gocharxslt.data() );

How i can capture this important error to say user error line xx tag ...

wenn i start a QTextStream out(stdout); is only write to stdout
i grab only ###start#### & #### end ##### and not stdout from xsltParseStylesheetFile on php i use http://php.net/ob-start and grab all or partial...

Qt Code:
  1. qDebug() << "### SHORTFILE " << SHORTFILE;
  2. qDebug() << "### DATA_FILE_XML " << DATA_FILE_XML;
  3. qDebug() << "### DATA_CONVERTER " << DATA_CONVERTER;
  4. QString actualxslt = xsl_area->document()->toPlainText();
  5. fxslt = db->file_put_contents(DATA_CONVERTER,actualxslt);
  6. QString actualxml = xml_area->document()->toPlainText();
  7. fxml = db->file_put_contents(DATA_FILE_XML,actualxslt);
  8.  
  9. /* ######################################### */
  10. xsltStylesheetPtr cur = NULL;
  11. xmlDocPtr doc, outputDoc;
  12. xmlSubstituteEntitiesDefault(1);
  13. /* ######################################### */
  14. QTextStream out(stdout);
  15. out << "######################start############################\n";
  16. QByteArray gocharxslt = DATA_CONVERTER.toAscii();
  17. cur = xsltParseStylesheetFile( (const xmlChar*)gocharxslt.data() );
  18. if (!cur) {
  19. xslt_error = "XSLT! [7] XsltParseStylesheetFile Failture files =>"+DATA_CONVERTER;
  20. }
  21. out << "\n#######################stop###########################\n" << endl;
  22. capturesdout = out.readAll();
  23. out.flush();
  24. qDebug() << "### CUR error " << cur;
  25. qDebug() << "### capturesdout error " << capturesdout;
  26. xsltFreeStylesheet(cur);
To copy to clipboard, switch view to plain text mode