aboutsummaryrefslogtreecommitdiffstats
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-11-06 16:43:11 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-11-06 16:43:11 +0000
commit9e8bfae59a087a938a810a5527023b1e7b0e15b3 (patch)
treea47575de598f9fa97697684b899562b76d03eca2 /xmllint.c
parenta4964b75003d138d4643ab03e3e116a8453f8308 (diff)
downloadandroid_external_libxml2-9e8bfae59a087a938a810a5527023b1e7b0e15b3.tar.gz
android_external_libxml2-9e8bfae59a087a938a810a5527023b1e7b0e15b3.tar.bz2
android_external_libxml2-9e8bfae59a087a938a810a5527023b1e7b0e15b3.zip
XInclude and other stuff while travelling. Contributed patches:
- tree.[ch] xinclude.[ch] xmllint.c configure.in valid.c debugXML.c xmlversion.h.in: Started adding XInclude support, this is a new xmllint option - tree.c xpath.c: applied TOM patches for XPath - xpointer.c: fixed a couple of errors. - uri.c: added an escaping function needed for xinclude - testXPath.c hash.c HTMLtree.c: minor cleanups raised by new warning from RH70 gcc's version Daniel
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/xmllint.c b/xmllint.c
index 5ce88e17..e443a86f 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -55,6 +55,9 @@
#include <libxml/xpath.h>
#include <libxml/debugXML.h>
#include <libxml/xmlerror.h>
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
#ifdef LIBXML_DEBUG_ENABLED
static int debug = 0;
@@ -81,6 +84,9 @@ static int memory = 0;
static int noblanks = 0;
static int testIO = 0;
static char *encoding = NULL;
+#ifdef LIBXML_XINCLUDE_ENABLED
+static int xinclude = 0;
+#endif
extern int xmlDoValidityCheckingDefaultValue;
extern int xmlGetWarningsDefaultValue;
@@ -497,10 +503,14 @@ void parseAndPrintFile(char *filename) {
/*
* If we don't have a document we might as well give up. Do we
* want an error message here? <sven@zen.org> */
- if (doc == NULL)
- {
+ if (doc == NULL) {
return;
- }
+ }
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (xinclude)
+ xmlXIncludeProcess(doc);
+#endif
#ifdef LIBXML_DEBUG_ENABLED
/*
@@ -667,6 +677,11 @@ int main(int argc, char **argv) {
else if ((!strcmp(argv[i], "-testIO")) ||
(!strcmp(argv[i], "--testIO")))
testIO++;
+#ifdef LIBXML_XINCLUDE_ENABLED
+ else if ((!strcmp(argv[i], "-xinclude")) ||
+ (!strcmp(argv[i], "--xinclude")))
+ xinclude++;
+#endif
else if ((!strcmp(argv[i], "-compress")) ||
(!strcmp(argv[i], "--compress"))) {
compress++;
@@ -773,6 +788,9 @@ int main(int argc, char **argv) {
printf("\t--noblanks : drop (ignorable?) blanks spaces\n");
printf("\t--testIO : test user I/O support\n");
printf("\t--encode encoding : output in the given encoding\n");
+#ifdef LIBXML_XINCLUDE_ENABLED
+ printf("\t--xinclude : do XInclude processing\n");
+#endif
}
xmlCleanupParser();
xmlMemoryDump();