Code

Indent support for XSLT extensions output.
authorJazzyNico <nicoduf@yahoo.fr>
Tue, 21 Dec 2010 18:43:32 +0000 (19:43 +0100)
committerJazzyNico <nicoduf@yahoo.fr>
Tue, 21 Dec 2010 18:43:32 +0000 (19:43 +0100)
src/extension/implementation/xslt.cpp

index c929ba19a429c6e0062ea0daca978b9e2234b8c4..762051339429aab6349614b16519779317462b0e 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <libxml/parser.h>
 #include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
 
 Inkscape::XML::Document * sp_repr_do_read (xmlDocPtr doc, const gchar * default_ns);
 
@@ -217,11 +218,16 @@ XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const
     params[0] = NULL;
 
     xmlDocPtr newdoc = xsltApplyStylesheet(_stylesheet, svgdoc, params);
-    xmlSaveFile(filename, newdoc);
+    //xmlSaveFile(filename, newdoc);
+    xsltSaveResultToFilename(filename, newdoc, _stylesheet, 0);
+
 
     xmlFreeDoc(newdoc);
     xmlFreeDoc(svgdoc);
 
+    xsltCleanupGlobals();
+    xmlCleanupParser();
+
     return;
 }