+ }
+#endif
+
+#if 0
+ // do it another way to detect transformation errors right now
+ // but does not seem to work either!
+ {
+ xsltTransformContextPtr ctxt;
+ ctxt = xsltNewTransformContext(m->stylesheet, rdoc);
+ new = xsltApplyStylesheetUser(m->stylesheet, rdoc, 0, 0, 0, ctxt);
+ if ((ctxt->state == XSLT_STATE_ERROR) ||
+ (ctxt->state == XSLT_STATE_STOPPED)){
+ yaz_log(YLOG_WARN, "XSLT transformation failed from %s",
+ cl->database->database->url);
+ xmlFreeDoc(new);
+ xmlFreeDoc(rdoc);
+ return 0;
+ }
+ }
+#endif
+