+ /* input conversion */
+ perform_convert(tinfo, p, 0, input->convert, params, &doc, 0);
+
+ if (tinfo->store)
+ {
+ /* store conversion */
+ store_doc = xmlCopyDoc(doc, 1);
+ perform_convert(tinfo, p, 0, tinfo->store->convert,
+ params, &store_doc, &last_xsp);
+ }
+
+ /* saving either store doc or original doc in case no store doc exists */
+ if (last_xsp)
+ xsltSaveResultToString(&buf_out, &len_out,
+ store_doc ? store_doc : doc, last_xsp);
+ else
+ xmlDocDumpMemory(store_doc ? store_doc : doc, &buf_out, &len_out);
+
+ if (p->setStoreData)
+ (*p->setStoreData)(p, buf_out, len_out);
+ xmlFree(buf_out);
+ if (store_doc)
+ xmlFreeDoc(store_doc);
+ }