mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-06 05:57:39 +03:00
- valid.c: couple of bug fixes pointed by Gary Pennington
- HTMLtree.c: #if 0 cleanup Daniel
This commit is contained in:
parent
2c257ec1ee
commit
5eef6225f7
@ -1,3 +1,8 @@
|
|||||||
|
Wed Feb 7 19:22:37 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* valid.c: couple of bug fixes pointed by Gary Pennington
|
||||||
|
* HTMLtree.c: #if 0 cleanup
|
||||||
|
|
||||||
Tue Feb 6 14:02:56 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Tue Feb 6 14:02:56 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* xpath.c: started profiling XSLT, added xmlXPathNodeSetAddUnique()
|
* xpath.c: started profiling XSLT, added xmlXPathNodeSetAddUnique()
|
||||||
|
15
HTMLtree.c
15
HTMLtree.c
@ -888,20 +888,6 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, const
|
|||||||
}
|
}
|
||||||
xmlOutputBufferWriteString(buf, ">");
|
xmlOutputBufferWriteString(buf, ">");
|
||||||
if (cur->content != NULL) {
|
if (cur->content != NULL) {
|
||||||
#if 0
|
|
||||||
xmlChar *buffer;
|
|
||||||
|
|
||||||
#ifndef XML_USE_BUFFER_CONTENT
|
|
||||||
buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
|
|
||||||
#else
|
|
||||||
buffer = xmlEncodeEntitiesReentrant(doc,
|
|
||||||
xmlBufferContent(cur->content));
|
|
||||||
#endif
|
|
||||||
if (buffer != NULL) {
|
|
||||||
xmlOutputBufferWriteString(buf, buffer);
|
|
||||||
xmlFree(buffer);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/*
|
/*
|
||||||
* Uses the OutputBuffer property to automatically convert
|
* Uses the OutputBuffer property to automatically convert
|
||||||
* invalids to charrefs
|
* invalids to charrefs
|
||||||
@ -912,7 +898,6 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, const
|
|||||||
#else
|
#else
|
||||||
xmlOutputBufferWriteString(buf,
|
xmlOutputBufferWriteString(buf,
|
||||||
(const char *) xmlBufferContent(cur->content));
|
(const char *) xmlBufferContent(cur->content));
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (cur->children != NULL) {
|
if (cur->children != NULL) {
|
||||||
|
22
valid.c
22
valid.c
@ -2831,12 +2831,14 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
|
|
||||||
/* Validity Constraint: ID uniqueness */
|
/* Validity Constraint: ID uniqueness */
|
||||||
if (attrDecl->atype == XML_ATTRIBUTE_ID) {
|
if (attrDecl->atype == XML_ATTRIBUTE_ID) {
|
||||||
xmlAddID(ctxt, doc, value, attr);
|
if (xmlAddID(ctxt, doc, value, attr) == NULL)
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((attrDecl->atype == XML_ATTRIBUTE_IDREF) ||
|
if ((attrDecl->atype == XML_ATTRIBUTE_IDREF) ||
|
||||||
(attrDecl->atype == XML_ATTRIBUTE_IDREFS)) {
|
(attrDecl->atype == XML_ATTRIBUTE_IDREFS)) {
|
||||||
xmlAddRef(ctxt, doc, value, attr);
|
if (xmlAddRef(ctxt, doc, value, attr) == NULL)
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Validity Constraint: Notation Attributes */
|
/* Validity Constraint: Notation Attributes */
|
||||||
@ -3706,6 +3708,14 @@ xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
|
|||||||
doc->extSubset = oldExt;
|
doc->extSubset = oldExt;
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
if (doc->ids != NULL) {
|
||||||
|
xmlFreeIDTable(doc->ids);
|
||||||
|
doc->ids = NULL;
|
||||||
|
}
|
||||||
|
if (doc->refs != NULL) {
|
||||||
|
xmlFreeRefTable(doc->refs);
|
||||||
|
doc->refs = NULL;
|
||||||
|
}
|
||||||
root = xmlDocGetRootElement(doc);
|
root = xmlDocGetRootElement(doc);
|
||||||
ret = xmlValidateElement(ctxt, doc, root);
|
ret = xmlValidateElement(ctxt, doc, root);
|
||||||
ret &= xmlValidateDocumentFinal(ctxt, doc);
|
ret &= xmlValidateDocumentFinal(ctxt, doc);
|
||||||
@ -3825,6 +3835,14 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doc->ids != NULL) {
|
||||||
|
xmlFreeIDTable(doc->ids);
|
||||||
|
doc->ids = NULL;
|
||||||
|
}
|
||||||
|
if (doc->refs != NULL) {
|
||||||
|
xmlFreeRefTable(doc->refs);
|
||||||
|
doc->refs = NULL;
|
||||||
|
}
|
||||||
ret = xmlValidateDtdFinal(ctxt, doc);
|
ret = xmlValidateDtdFinal(ctxt, doc);
|
||||||
if (!xmlValidateRoot(ctxt, doc)) return(0);
|
if (!xmlValidateRoot(ctxt, doc)) return(0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user