patch from Richard Jinks for XPath substring() function new set of tests
* xpath.c: patch from Richard Jinks for XPath substring() function
* result/XPath/expr/strings test/XPath/expr/strings: new set of tests
Daniel
diff --git a/tree.c b/tree.c
index c8959f6..b4b143b 100644
--- a/tree.c
+++ b/tree.c
@@ -6986,16 +6986,17 @@
}
/**
- * xmlDocDump:
+ * xmlDocFormatDump:
* @f: the FILE*
* @cur: the document
+ * @format: should formatting spaces been added
*
* Dump an XML document to an open FILE.
*
* returns: the number of bytes written or -1 in case of failure.
*/
int
-xmlDocDump(FILE *f, xmlDocPtr cur) {
+xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
xmlOutputBufferPtr buf;
const char * encoding;
xmlCharEncodingHandlerPtr handler = NULL;
@@ -7030,13 +7031,27 @@
}
buf = xmlOutputBufferCreateFile(f, handler);
if (buf == NULL) return(-1);
- xmlDocContentDumpOutput(buf, cur, NULL, 0);
+ xmlDocContentDumpOutput(buf, cur, NULL, format);
ret = xmlOutputBufferClose(buf);
return(ret);
}
/**
+ * xmlDocDump:
+ * @f: the FILE*
+ * @cur: the document
+ *
+ * Dump an XML document to an open FILE.
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlDocDump(FILE *f, xmlDocPtr cur) {
+ return(xmlDocFormatDump (f, cur, 0));
+}
+
+/**
* xmlSaveFileTo:
* @buf: an output I/O buffer
* @cur: the document