+
+ /* now saving into buffer and re-reading into DOM to avoid annoing
+ XSLT problem with thrown-out indentation text nodes */
+ if (res_doc){
+ xsltSaveResultToString(&buf_out, &len_out, res_doc,
+ convert->stylesheet_xsp);
+ xmlFreeDoc(res_doc);
+ }
+
+
+ *doc = xmlParseDoc(buf_out);
+
+ /* writing debug info out */
+ if (extctr->flagShowRecords)
+ yaz_log(YLOG_LOG, "%s: XSLT %s \n %s",
+ tinfo->fname ? tinfo->fname : "(none)",
+ convert->stylesheet,
+ buf_out);
+
+ xmlFree(buf_out);