aboutsummaryrefslogtreecommitdiffstats
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-05-22 15:08:55 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-05-22 15:08:55 +0000
commit81418e38c80cf1ddac6fe1426d8037a3da39853f (patch)
tree0904bda605503c1695979c8d0125d480d0781f22 /xmllint.c
parentaf86c7f4631c95b93f9132825113ce6bd2144f44 (diff)
downloadandroid_external_libxml2-81418e38c80cf1ddac6fe1426d8037a3da39853f.tar.gz
android_external_libxml2-81418e38c80cf1ddac6fe1426d8037a3da39853f.tar.bz2
android_external_libxml2-81418e38c80cf1ddac6fe1426d8037a3da39853f.zip
- catalog.[ch]: fixes and add xmlLoadCatalogs()
- DOCBparser.c: small cleanup - xmllint.c: added a --catalogs option to load catalogs from $SGML_CATALOG_FILES - tree.c: cleanup - configure.in: iconv library fixup, ICONV_LIBS Daniel
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/xmllint.c b/xmllint.c
index eaab6ddb..41b9982a 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -62,6 +62,9 @@
#ifdef LIBXML_XINCLUDE_ENABLED
#include <libxml/xinclude.h>
#endif
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
#ifdef LIBXML_DEBUG_ENABLED
static int debug = 0;
@@ -849,6 +852,19 @@ main(int argc, char **argv) {
xmlParserDebugEntities = 1;
}
#endif
+#ifdef LIBXML_CATALOG_ENABLED
+ else if ((!strcmp(argv[i], "-catalogs")) ||
+ (!strcmp(argv[i], "--catalogs"))) {
+ const char *catalogs;
+
+ catalogs = getenv("SGML_CATALOG_FILES");
+ if (catalogs == NULL) {
+ fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n");
+ } else {
+ xmlLoadCatalogs(catalogs);
+ }
+ }
+#endif
else if ((!strcmp(argv[i], "-encode")) ||
(!strcmp(argv[i], "--encode"))) {
i++;
@@ -947,6 +963,9 @@ 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_CATALOG_ENABLED
+ printf("\t--catalogs : use the catalogs from $SGML_CATALOG_FILES\n");
+#endif
printf("\t--auto : generate a small doc on the fly\n");
#ifdef LIBXML_XINCLUDE_ENABLED
printf("\t--xinclude : do XInclude processing\n");