diff --git a/ChangeLog b/ChangeLog index 26851009..cfe9e9ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Mar 21 22:19:14 CET 2003 Daniel Veillard + + * configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec + instead of libxml.spec + * relaxng.c: fixed some of the error reporting excessive + verbosity + * catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c + xmlschemastypes.c: removed some warnings from gcc + * doc/libxml2-api.xml: rebuilt + Fri Mar 21 17:25:23 CET 2003 Daniel Veillard * relaxng.c: another optimization, for choice this time diff --git a/Makefile.am b/Makefile.am index 98774dfd..cb482f6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -734,8 +734,8 @@ Relaxtests: xmllint$(EXEEXT) fi ; fi ; \ done; done) -dist-hook: libxml.spec - -cp libxml.spec $(distdir) +dist-hook: libxml2.spec + -cp libxml2.spec $(distdir) (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -) cleantar: @@ -753,7 +753,7 @@ CLEANFILES=xml2Conf.sh confexecdir=$(libdir) confexec_DATA = xml2Conf.sh -EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \ +EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ libxml.m4 Copyright check-xml-test-suite.py \ check-relaxng-test-suite.py check-xinclude-test-suite.py \ example/Makefile.am example/gjobread.c example/gjobs.xml \ diff --git a/catalog.c b/catalog.c index c7da3069..040d99ca 100644 --- a/catalog.c +++ b/catalog.c @@ -411,7 +411,7 @@ xmlCatalogDumpEntry(xmlCatalogEntryPtr entry, FILE *out) { case SGML_CATA_DOCTYPE: case SGML_CATA_LINKTYPE: case SGML_CATA_NOTATION: - fprintf(out, "%s", entry->name); break; + fprintf(out, "%s", (const char *) entry->name); break; case SGML_CATA_PUBLIC: case SGML_CATA_SYSTEM: case SGML_CATA_SGMLDECL: diff --git a/configure.in b/configure.in index 62c7c346..725c7efe 100644 --- a/configure.in +++ b/configure.in @@ -649,6 +649,6 @@ AC_SUBST(RELDATE) rm -f COPYING.LIB COPYING ln -s Copyright COPYING -AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py) +AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py) chmod +x xml2-config xml2Conf.sh python/setup.py diff --git a/debugXML.c b/debugXML.c index 07a01686..cbb74c04 100644 --- a/debugXML.c +++ b/debugXML.c @@ -1200,11 +1200,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { switch (node->type) { case XML_ELEMENT_NODE: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); break; case XML_ATTRIBUTE_NODE: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); break; case XML_TEXT_NODE: if (node->content != NULL) { @@ -1215,15 +1215,15 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { break; case XML_ENTITY_REF_NODE: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); break; case XML_ENTITY_NODE: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); break; case XML_PI_NODE: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); break; case XML_COMMENT_NODE: break; @@ -1248,7 +1248,7 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { } default: if (node->name != NULL) - fprintf(output, "%s", node->name); + fprintf(output, "%s", (const char *) node->name); } fprintf(output, "\n"); } diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 015046f6..c44628e7 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -484,6 +484,7 @@ + @@ -1164,6 +1165,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1182,6 +1221,7 @@ + @@ -2466,6 +2506,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2965,6 +3043,7 @@ actually an xmlCharEncoding'/> + @@ -6249,6 +6328,12 @@ actually an xmlCharEncoding'/> + + Tries to delete an item (file or directory) from server + + + + Frees the context after closing the connection. @@ -9206,7 +9291,7 @@ actually an xmlCharEncoding'/> - Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec + Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity diff --git a/relaxng.c b/relaxng.c index 51330f0c..b1245d77 100644 --- a/relaxng.c +++ b/relaxng.c @@ -1593,8 +1593,10 @@ xmlRelaxNGValidErrorPop(xmlRelaxNGValidCtxtPtr ctxt) { xmlRelaxNGValidErrorPtr cur; - if (ctxt->errNr <= 0) + if (ctxt->errNr <= 0) { + ctxt->err = NULL; return; + } ctxt->errNr--; if (ctxt->errNr > 0) ctxt->err = &ctxt->errTab[ctxt->errNr - 1]; @@ -2066,6 +2068,8 @@ xmlRelaxNGPopErrors(xmlRelaxNGValidCtxtPtr ctxt, int level) { } } ctxt->errNr = level; + if (ctxt->errNr <= 0) + ctxt->err = NULL; } /** * xmlRelaxNGDumpValidError: @@ -2075,13 +2079,22 @@ xmlRelaxNGPopErrors(xmlRelaxNGValidCtxtPtr ctxt, int level) { */ static void xmlRelaxNGDumpValidError(xmlRelaxNGValidCtxtPtr ctxt) { - int i; - xmlRelaxNGValidErrorPtr err; + int i, j; + xmlRelaxNGValidErrorPtr err, dup; for (i = 0;i < ctxt->errNr;i++) { err = &ctxt->errTab[i]; + for (j = 0;j < i;j++) { + dup = &ctxt->errTab[j]; + if ((err->err == dup->err) && (err->node == dup->node) && + (xmlStrEqual(err->arg1, dup->arg1)) && + (xmlStrEqual(err->arg2, dup->arg2))) { + goto skip; + } + } xmlRelaxNGShowValidError(ctxt, err->err, err->node, err->seq, err->arg1, err->arg2); +skip: if (err->flags & ERROR_IS_DUP) { if (err->arg1 != NULL) xmlFree((xmlChar *)err->arg1); @@ -7912,7 +7925,7 @@ static int xmlRelaxNGElementMatch(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGDefinePtr define, xmlNodePtr elem) { - int ret = 0, oldflags; + int ret = 0, oldflags = 0; if (define->name != NULL) { if (!xmlStrEqual(elem->name, define->name)) { @@ -8126,10 +8139,13 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, */ if (node->_private == define) { ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt, node->next); + if (ctxt->errNr > errNr) xmlRelaxNGPopErrors(ctxt, errNr); if (ctxt->errNr != 0) { while ((ctxt->err != NULL) && (((ctxt->err->err == XML_RELAXNG_ERR_ELEMNAME) && (xmlStrEqual(ctxt->err->arg2, node->name))) || + ((ctxt->err->err == XML_RELAXNG_ERR_ELEMEXTRANS) && + (xmlStrEqual(ctxt->err->arg1, node->name))) || (ctxt->err->err == XML_RELAXNG_ERR_NOELEM) || (ctxt->err->err == XML_RELAXNG_ERR_NOTELEM))) xmlRelaxNGValidErrorPop(ctxt); @@ -8146,9 +8162,12 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, } ret = 0; if (ctxt->errNr != 0) { + if (ctxt->errNr > errNr) xmlRelaxNGPopErrors(ctxt, errNr); while ((ctxt->err != NULL) && (((ctxt->err->err == XML_RELAXNG_ERR_ELEMNAME) && (xmlStrEqual(ctxt->err->arg2, node->name))) || + ((ctxt->err->err == XML_RELAXNG_ERR_ELEMEXTRANS) && + (xmlStrEqual(ctxt->err->arg1, node->name))) || (ctxt->err->err == XML_RELAXNG_ERR_NOELEM) || (ctxt->err->err == XML_RELAXNG_ERR_NOTELEM))) xmlRelaxNGValidErrorPop(ctxt); @@ -8394,7 +8413,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, break; } case XML_RELAXNG_CHOICE: { - xmlRelaxNGDefinePtr list; + xmlRelaxNGDefinePtr list = NULL; xmlRelaxNGStatesPtr states = NULL; node = xmlRelaxNGSkipIgnored(ctxt, node); @@ -8853,8 +8872,15 @@ xmlRelaxNGValidateDocument(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc) { xmlRelaxNGFreeValidState(ctxt, ctxt->state); ctxt->state = NULL; } - if (ret != 0) + if (ret != 0) xmlRelaxNGDumpValidError(ctxt); +#ifdef DEBUG + else if (ctxt->errNr != 0) { + ctxt->error(ctxt->userData, "%d Extra error messages left on stack !\n", + ctxt->errNr); + xmlRelaxNGDumpValidError(ctxt); + } +#endif if (ctxt->idref == 1) { xmlValidCtxt vctxt; diff --git a/valid.c b/valid.c index b3b52c9f..599a818f 100644 --- a/valid.c +++ b/valid.c @@ -5326,7 +5326,8 @@ done: */ int xmlValidatePopElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc ATTRIBUTE_UNUSED, - xmlNodePtr elem, const xmlChar *qname ATTRIBUTE_UNUSED) { + xmlNodePtr elem ATTRIBUTE_UNUSED, + const xmlChar *qname ATTRIBUTE_UNUSED) { int ret = 1; if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) { diff --git a/xmlreader.c b/xmlreader.c index 9d93f81e..1604602f 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -2347,7 +2347,7 @@ xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator) { if ((input->filename == NULL) && (ctx->inputNr > 1)) input = ctx->inputTab[ctx->inputNr - 2]; if (input != NULL) { - ret = xmlStrdup(input->filename); + ret = xmlStrdup(BAD_CAST input->filename); } else { ret = NULL; diff --git a/xmlschemas.c b/xmlschemas.c index 018b0b21..bc6f4d3f 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -702,7 +702,7 @@ xmlSchemaDump(FILE * output, xmlSchemaPtr schema) else fprintf(output, "no name, "); if (schema->targetNamespace != NULL) - fprintf(output, "%s", schema->targetNamespace); + fprintf(output, "%s", (const char *) schema->targetNamespace); else fprintf(output, "no target namespace"); fprintf(output, "\n"); diff --git a/xmlschemastypes.c b/xmlschemastypes.c index e626e616..cb29a557 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -1103,7 +1103,7 @@ xmlSchemaValAtomicListNode(xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *ret, xmlNodePtr node) { xmlChar *val, *cur, *endval; int nb_values = 0; - int tmp; + int tmp = 0; if (value == NULL) { return(-1); diff --git a/xpath.c b/xpath.c index 1171996a..188b12d8 100644 --- a/xpath.c +++ b/xpath.c @@ -800,7 +800,7 @@ xmlXPathDebugDumpStepOp(FILE *output, xmlXPathCompExprPtr comp, if (prefix != NULL) fprintf(output, "%s:", prefix); if (name != NULL) - fprintf(output, "%s", name); + fprintf(output, "%s", (const char *) name); break; }