1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-12 09:17:37 +03:00

fixed Red Hat bug #86118 use libxml2.spec instead of libxml.spec fixed

* 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
Daniel
This commit is contained in:
Daniel Veillard 2003-03-21 21:22:48 +00:00
parent e063f4829d
commit 580ced8ee2
12 changed files with 145 additions and 23 deletions

View File

@ -1,3 +1,13 @@
Fri Mar 21 22:19:14 CET 2003 Daniel Veillard <daniel@veillard.com>
* 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 <daniel@veillard.com>
* relaxng.c: another optimization, for choice this time

View File

@ -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 \

View File

@ -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:

View File

@ -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

View File

@ -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");
}

View File

@ -484,6 +484,7 @@
<exports symbol='xmlNanoFTPConnect'/>
<exports symbol='xmlNanoFTPConnectTo'/>
<exports symbol='xmlNanoFTPCwd'/>
<exports symbol='xmlNanoFTPDele'/>
<exports symbol='xmlNanoFTPFreeCtxt'/>
<exports symbol='xmlNanoFTPGet'/>
<exports symbol='xmlNanoFTPGetConnection'/>
@ -1164,6 +1165,44 @@
<exports symbol='xmlTextReaderXmlLang'/>
</file>
<file name='relaxng'>
<exports symbol='XML_RELAXNG_ERR_ATTREXTRANS'/>
<exports symbol='XML_RELAXNG_ERR_ATTRNAME'/>
<exports symbol='XML_RELAXNG_ERR_ATTRNONS'/>
<exports symbol='XML_RELAXNG_ERR_ATTRVALID'/>
<exports symbol='XML_RELAXNG_ERR_ATTRWRONGNS'/>
<exports symbol='XML_RELAXNG_ERR_CONTENTVALID'/>
<exports symbol='XML_RELAXNG_ERR_DATAELEM'/>
<exports symbol='XML_RELAXNG_ERR_DATATYPE'/>
<exports symbol='XML_RELAXNG_ERR_DUPID'/>
<exports symbol='XML_RELAXNG_ERR_ELEMEXTRANS'/>
<exports symbol='XML_RELAXNG_ERR_ELEMNAME'/>
<exports symbol='XML_RELAXNG_ERR_ELEMNONS'/>
<exports symbol='XML_RELAXNG_ERR_ELEMNOTEMPTY'/>
<exports symbol='XML_RELAXNG_ERR_ELEMWRONGNS'/>
<exports symbol='XML_RELAXNG_ERR_EXTRACONTENT'/>
<exports symbol='XML_RELAXNG_ERR_EXTRADATA'/>
<exports symbol='XML_RELAXNG_ERR_INTEREXTRA'/>
<exports symbol='XML_RELAXNG_ERR_INTERNAL'/>
<exports symbol='XML_RELAXNG_ERR_INTERNODATA'/>
<exports symbol='XML_RELAXNG_ERR_INTERSEQ'/>
<exports symbol='XML_RELAXNG_ERR_INVALIDATTR'/>
<exports symbol='XML_RELAXNG_ERR_LACKDATA'/>
<exports symbol='XML_RELAXNG_ERR_LIST'/>
<exports symbol='XML_RELAXNG_ERR_LISTELEM'/>
<exports symbol='XML_RELAXNG_ERR_LISTEMPTY'/>
<exports symbol='XML_RELAXNG_ERR_LISTEXTRA'/>
<exports symbol='XML_RELAXNG_ERR_MEMORY'/>
<exports symbol='XML_RELAXNG_ERR_NODEFINE'/>
<exports symbol='XML_RELAXNG_ERR_NOELEM'/>
<exports symbol='XML_RELAXNG_ERR_NOGRAMMAR'/>
<exports symbol='XML_RELAXNG_ERR_NOSTATE'/>
<exports symbol='XML_RELAXNG_ERR_NOTELEM'/>
<exports symbol='XML_RELAXNG_ERR_TYPE'/>
<exports symbol='XML_RELAXNG_ERR_TYPECMP'/>
<exports symbol='XML_RELAXNG_ERR_TYPEVAL'/>
<exports symbol='XML_RELAXNG_ERR_VALELEM'/>
<exports symbol='XML_RELAXNG_ERR_VALUE'/>
<exports symbol='XML_RELAXNG_OK'/>
<exports symbol='xmlRelaxNG'/>
<exports symbol='xmlRelaxNGCleanupTypes'/>
<exports symbol='xmlRelaxNGDump'/>
@ -1182,6 +1221,7 @@
<exports symbol='xmlRelaxNGSetValidErrors'/>
<exports symbol='xmlRelaxNGValidCtxt'/>
<exports symbol='xmlRelaxNGValidCtxtPtr'/>
<exports symbol='xmlRelaxNGValidErr'/>
<exports symbol='xmlRelaxNGValidateDoc'/>
<exports symbol='xmlRelaxNGValidateStream'/>
<exports symbol='xmlRelaxNGValidityErrorFunc'/>
@ -2466,6 +2506,44 @@
<enum name='XML_PARSER_SYSTEM_LITERAL' file='parser' value='13' type='xmlParserInputState' info='within a SYSTEM value'/>
<enum name='XML_PARSER_VALIDATE' file='xmlreader' value='3' type='xmlParserProperties'/>
<enum name='XML_PI_NODE' file='tree' value='7' type='xmlElementType'/>
<enum name='XML_RELAXNG_ERR_ATTREXTRANS' file='relaxng' value='20' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ATTRNAME' file='relaxng' value='14' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ATTRNONS' file='relaxng' value='16' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ATTRVALID' file='relaxng' value='24' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ATTRWRONGNS' file='relaxng' value='18' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_CONTENTVALID' file='relaxng' value='25' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_DATAELEM' file='relaxng' value='28' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_DATATYPE' file='relaxng' value='31' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_DUPID' file='relaxng' value='4' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ELEMEXTRANS' file='relaxng' value='19' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ELEMNAME' file='relaxng' value='13' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ELEMNONS' file='relaxng' value='15' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ELEMNOTEMPTY' file='relaxng' value='21' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_ELEMWRONGNS' file='relaxng' value='17' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_EXTRACONTENT' file='relaxng' value='26' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_EXTRADATA' file='relaxng' value='35' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_INTEREXTRA' file='relaxng' value='12' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_INTERNAL' file='relaxng' value='37' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_INTERNODATA' file='relaxng' value='10' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_INTERSEQ' file='relaxng' value='11' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_INVALIDATTR' file='relaxng' value='27' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_LACKDATA' file='relaxng' value='36' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_LIST' file='relaxng' value='33' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_LISTELEM' file='relaxng' value='30' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_LISTEMPTY' file='relaxng' value='9' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_LISTEXTRA' file='relaxng' value='8' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_MEMORY' file='relaxng' value='1' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_NODEFINE' file='relaxng' value='7' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_NOELEM' file='relaxng' value='22' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_NOGRAMMAR' file='relaxng' value='34' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_NOSTATE' file='relaxng' value='6' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_NOTELEM' file='relaxng' value='23' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_TYPE' file='relaxng' value='2' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_TYPECMP' file='relaxng' value='5' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_TYPEVAL' file='relaxng' value='3' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_VALELEM' file='relaxng' value='29' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_ERR_VALUE' file='relaxng' value='32' type='xmlRelaxNGValidErr'/>
<enum name='XML_RELAXNG_OK' file='relaxng' value='0' type='xmlRelaxNGValidErr'/>
<enum name='XML_TEXT_NODE' file='tree' value='3' type='xmlElementType'/>
<enum name='XML_WAR_CATALOG_PI' file='xmlerror' value='93' type='xmlParserErrors' info='93'/>
<enum name='XML_WAR_UNDECLARED_ENTITY' file='xmlerror' value='27' type='xmlParserErrors'/>
@ -2965,6 +3043,7 @@ actually an xmlCharEncoding'/>
<typedef name='xmlRelaxNGPtr' file='relaxng' type='xmlRelaxNG *'/>
<struct name='xmlRelaxNGValidCtxt' file='relaxng' type='struct _xmlRelaxNGValidCtxt'/>
<typedef name='xmlRelaxNGValidCtxtPtr' file='relaxng' type='xmlRelaxNGValidCtxt *'/>
<typedef name='xmlRelaxNGValidErr' file='relaxng' type='enum'/>
<struct name='xmlSAXHandler' file='tree' type='struct _xmlSAXHandler'>
<field name='internalSubset' type='internalSubsetSAXFunc' info=''/>
<field name='isStandalone' type='isStandaloneSAXFunc' info=''/>
@ -6249,6 +6328,12 @@ actually an xmlCharEncoding'/>
<arg name='ctx' type='void *' info='an FTP context'/>
<arg name='directory' type='char *' info='a directory on the server'/>
</function>
<function name='xmlNanoFTPDele' file='nanoftp'>
<info>Tries to delete an item (file or directory) from server</info>
<return type='int' info='-1 incase of error, 1 if DELE worked, 0 if it failed'/>
<arg name='ctx' type='void *' info='an FTP context'/>
<arg name='file' type='char *' info='a file or directory on the server'/>
</function>
<function name='xmlNanoFTPFreeCtxt' file='nanoftp'>
<info>Frees the context after closing the connection.</info>
<return type='void'/>
@ -9206,7 +9291,7 @@ actually an xmlCharEncoding'/>
<arg name='doc' type='xmlDocPtr' info='a document instance'/>
</function>
<function name='xmlValidateDocumentFinal' file='valid'>
<info>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</info>
<info>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</info>
<return type='int' info='1 if valid or 0 otherwise'/>
<arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
<arg name='doc' type='xmlDocPtr' info='a document instance'/>

View File

@ -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;

View File

@ -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)) {

View File

@ -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;

View File

@ -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");

View File

@ -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);

View File

@ -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;
}