Added output of XML after each transformation on YLOG_DEBUG level, run indexer with '-v debug' to see all transformations
+domfilter.eps
+domfilter.png
+domfilter.pdf
zebra.tex
zebra.out
zebra.log
zebra.tex
zebra.out
zebra.log
-/* $Id: mod_dom.c,v 1.22 2007-02-28 13:16:24 marc Exp $
+/* $Id: mod_dom.c,v 1.23 2007-02-28 14:46:41 marc Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
{
for (; convert; convert = convert->next)
{
{
for (; convert; convert = convert->next)
{
+ xmlChar *buf_out = 0;
+ int len_out = 0;
xmlDocPtr res_doc = xsltApplyStylesheet(convert->stylesheet_xsp,
*doc, params);
if (last_xsp)
*last_xsp = convert->stylesheet_xsp;
xmlDocPtr res_doc = xsltApplyStylesheet(convert->stylesheet_xsp,
*doc, params);
if (last_xsp)
*last_xsp = convert->stylesheet_xsp;
+ /* *doc = res_doc; */
+
+ /* 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);
+
+ yaz_log(YLOG_DEBUG, "%s: %s \n %s",
+ tinfo->fname ? tinfo->fname : "none ",
+ convert->stylesheet,
+ buf_out);
+
+ xmlFree(buf_out);
/* finally, do the indexing */
if (doc)
/* finally, do the indexing */
if (doc)
extract_dom_doc_node(tinfo, p, doc);
extract_dom_doc_node(tinfo, p, doc);
- /* extract_doc_alvis(tinfo, p, doc); */
return RECCTRL_EXTRACT_OK;
}
return RECCTRL_EXTRACT_OK;
}