aboutsummaryrefslogtreecommitdiffstats
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-07-09 17:32:57 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-07-09 17:32:57 +0000
commit971771ef5a5f306ddcdd0015b2bedd320bd62c8b (patch)
tree2a9f7f45851ecc625d1ec7d1f3123ed5023eeb2c /xmllint.c
parentc306d904c6fe91afdbf6fc8164427c833251eb15 (diff)
downloadandroid_external_libxml2-971771ef5a5f306ddcdd0015b2bedd320bd62c8b.tar.gz
android_external_libxml2-971771ef5a5f306ddcdd0015b2bedd320bd62c8b.tar.bz2
android_external_libxml2-971771ef5a5f306ddcdd0015b2bedd320bd62c8b.zip
fix for #309761 from Dylan Shell added xmlSchemaSAXPlug and
* parser.c: fix for #309761 from Dylan Shell * xmlschemas.c include/libxml/xmlschemas.h: added xmlSchemaSAXPlug and xmlSchemaSAXUnplug generic APIs for SAX Schemas validation. * xmllint.c: couple of fixes plus added descriptions for --sax and --sax1 Daniel
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/xmllint.c b/xmllint.c
index dbc5d35d..e7358bc7 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -838,7 +838,7 @@ xmlSAXHandler emptySAXHandlerStruct = {
NULL, /* getParameterEntity */
NULL, /* cdataBlock; */
NULL, /* externalSubset; */
- 1,
+ XML_SAX2_MAGIC,
NULL,
NULL, /* startElementNs */
NULL, /* endElementNs */
@@ -1632,16 +1632,19 @@ testSAX(const char *filename) {
(xmlSchemaValidityWarningFunc) fprintf,
stderr);
- ret = xmlSchemaValidateStream(vctxt, buf, 0, handler, user_data);
- if (ret == 0) {
- fprintf(stderr, "%s validates\n", filename);
- } else if (ret > 0) {
- fprintf(stderr, "%s fails to validate\n", filename);
- progresult = XMLLINT_ERR_VALID;
- } else {
- fprintf(stderr, "%s validation generated an internal error\n",
- filename);
- progresult = XMLLINT_ERR_VALID;
+ ret = xmlSchemaValidateStream(vctxt, buf, 0, handler,
+ (void *)user_data);
+ if (repeat == 0) {
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
}
xmlSchemaFreeValidCtxt(vctxt);
} else
@@ -2790,6 +2793,11 @@ static void usage(const char *name) {
printf("\t--relaxng schema : do RelaxNG validation against the schema\n");
printf("\t--schema schema : do validation against the WXS schema\n");
#endif
+#ifdef LIBXML_SAX1_ENABLED
+ printf("\t--sax1: use the old SAX1 interfaces for processing\n");
+#endif
+ printf("\t--sax: do not build a tree but work just at the SAX level\n");
+
printf("\nLibxml project home page: http://xmlsoft.org/\n");
printf("To report bugs or get some help check: http://xmlsoft.org/bugs.html\n");
}