1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Jumbo patch, resync of W3C/Gnome CVS trees:

- uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished
  the cleanup of the computation of URI references when seeking
  external entities. The URI reference string and the resulting
  URI are both stored now.
- parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c:
  large s(n)printf checks and cleanup from Denis Barbier
  <barbier@imacs.polytechnique.fr>
- xmlversion.h.in tree.h: couple of SGML declarations for a
  possible docbook module.
- result/VC/ : a couple of test output changed due to the change
  of the entities URI
Daniel
This commit is contained in:
Daniel Veillard
2000-09-10 16:14:55 +00:00
parent b513f5a00d
commit 39c7d71a3b
29 changed files with 605 additions and 246 deletions

13
valid.c
View File

@ -2856,8 +2856,9 @@ xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
snprintf((char *) qname, sizeof(qname), "%s:%s",
elem->ns->prefix, elem->name);
#else
sprintf(qname, "%s:%s", elem->name, elem->ns->prefix);
sprintf((char *) qname, "%s:%s", elem->ns->prefix, elem->name);
#endif
qname[sizeof(qname) - 1] = 0;
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, qname, name);
if ((attrDecl == NULL) && (doc->extSubset != NULL))
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, qname, name);
@ -3133,8 +3134,9 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
snprintf((char *) qname, sizeof(qname), "%s:%s",
elem->ns->prefix, elem->name);
#else
sprintf(qname, "%s:%s", elem->name, elem->ns->prefix);
sprintf((char *) qname, "%s:%s", elem->ns->prefix, elem->name);
#endif
qname[sizeof(qname) - 1] = 0;
if (attr->ns != NULL) {
attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, qname,
attr->name, attr->ns->prefix);
@ -3699,8 +3701,10 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
snprintf((char *) qname, sizeof(qname), "%s:%s",
child->ns->prefix, child->name);
#else
sprintf(qname, "%s:%s", child->name, child->ns->prefix);
sprintf((char *) qname, "%s:%s",
child->ns->prefix, child->name);
#endif
qname[sizeof(qname) - 1] = 0;
cont = elemDecl->content;
while (cont != NULL) {
if (cont->type == XML_ELEMENT_CONTENT_ELEMENT) {
@ -3876,8 +3880,9 @@ xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
snprintf((char *) qname, sizeof(qname), "%s:%s",
root->ns->prefix, root->name);
#else
sprintf(qname, "%s:%s", root->name, root->ns->prefix);
sprintf((char *) qname, "%s:%s", root->ns->prefix, root->name);
#endif
qname[sizeof(qname) - 1] = 0;
if (!xmlStrcmp(doc->intSubset->name, qname))
goto name_ok;
}