Fixed bug #594: Zebra pollutes XSLT output? For alvis and xslt
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 May 2006 18:31:33 +0000 (18:31 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 May 2006 18:31:33 +0000 (18:31 +0000)
filter we are using xsltSaveResultToString instead of xmlDocDumpMemory.

recctrl/alvis.c
recctrl/xslt.c

index 01db970..ec22ed7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: alvis.c,v 1.14 2006-05-24 12:56:56 marc Exp $
+/* $Id: alvis.c,v 1.15 2006-05-24 18:31:33 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -656,20 +656,23 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
     {
        xmlChar *buf_out;
        int len_out;
-       xmlDocDumpMemory(resDoc, &buf_out, &len_out);
+
+        xsltSaveResultToString(&buf_out, &len_out, resDoc,
+                               schema->stylesheet_xsp);        
 
        p->output_format = VAL_TEXT_XML;
        p->rec_len = len_out;
        p->rec_buf = odr_malloc(p->odr, p->rec_len);
        memcpy(p->rec_buf, buf_out, p->rec_len);
-       
        xmlFree(buf_out);
     }
     else if (p->output_format == VAL_SUTRS)
     {
        xmlChar *buf_out;
        int len_out;
-       xmlDocDumpMemory(resDoc, &buf_out, &len_out);
+
+        xsltSaveResultToString(&buf_out, &len_out, resDoc,
+                               schema->stylesheet_xsp);        
 
        p->output_format = VAL_SUTRS;
        p->rec_len = len_out;
index 6544b37..5a9867c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: xslt.c,v 1.24 2006-05-24 12:56:56 marc Exp $
+/* $Id: xslt.c,v 1.25 2006-05-24 18:31:33 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -692,7 +692,9 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
     {
        xmlChar *buf_out;
        int len_out;
-       xmlDocDumpMemory(resDoc, &buf_out, &len_out);
+
+        xsltSaveResultToString(&buf_out, &len_out, resDoc,
+                               schema->stylesheet_xsp);        
 
        p->output_format = VAL_TEXT_XML;
        p->rec_len = len_out;
@@ -705,7 +707,9 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
     {
        xmlChar *buf_out;
        int len_out;
-       xmlDocDumpMemory(resDoc, &buf_out, &len_out);
+
+        xsltSaveResultToString(&buf_out, &len_out, resDoc,
+                               schema->stylesheet_xsp);        
 
        p->output_format = VAL_SUTRS;
        p->rec_len = len_out;