mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-16 07:21:58 +03:00
Good old cycle: new release, new bug reports, new fixes ...
- HTMLtree.c HTMLtree.h : closing #53402 i.e. output of PIs when using xsl:output - valid.c: closing #53537 some case generate segfaults if there is validity errors Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Tue Apr 24 17:36:35 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* HTMLtree.c HTMLtree.h : closing #53402 i.e. output of
|
||||||
|
PIs when using xsl:output
|
||||||
|
* valid.c: closing #53537 some case generate segfaults if there
|
||||||
|
is validity errors
|
||||||
|
|
||||||
Tue Apr 24 15:19:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Tue Apr 24 15:19:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* SAX.c testDocbook.c DOCBparser.c: more work on the support
|
* SAX.c testDocbook.c DOCBparser.c: more work on the support
|
||||||
|
25
HTMLtree.c
25
HTMLtree.c
@ -515,6 +515,18 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (cur->type == HTML_PI_NODE) {
|
||||||
|
if (cur->content != NULL) {
|
||||||
|
xmlBufferWriteChar(buf, "<?");
|
||||||
|
#ifndef XML_USE_BUFFER_CONTENT
|
||||||
|
xmlBufferWriteCHAR(buf, cur->content);
|
||||||
|
#else
|
||||||
|
xmlBufferWriteCHAR(buf, xmlBufferContent(cur->content));
|
||||||
|
#endif
|
||||||
|
xmlBufferWriteChar(buf, ">");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (cur->type == HTML_ENTITY_REF_NODE) {
|
if (cur->type == HTML_ENTITY_REF_NODE) {
|
||||||
xmlBufferWriteChar(buf, "&");
|
xmlBufferWriteChar(buf, "&");
|
||||||
xmlBufferWriteCHAR(buf, cur->name);
|
xmlBufferWriteCHAR(buf, cur->name);
|
||||||
@ -867,6 +879,19 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (cur->type == HTML_PI_NODE) {
|
||||||
|
if (cur->content != NULL) {
|
||||||
|
xmlOutputBufferWriteString(buf, "<?");
|
||||||
|
#ifndef XML_USE_BUFFER_CONTENT
|
||||||
|
xmlOutputBufferWriteString(buf, (const char *)cur->content);
|
||||||
|
#else
|
||||||
|
xmlOutputBufferWriteString(buf, (const char *)
|
||||||
|
xmlBufferContent(cur->content));
|
||||||
|
#endif
|
||||||
|
xmlOutputBufferWriteString(buf, ">");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (cur->type == HTML_ENTITY_REF_NODE) {
|
if (cur->type == HTML_ENTITY_REF_NODE) {
|
||||||
xmlOutputBufferWriteString(buf, "&");
|
xmlOutputBufferWriteString(buf, "&");
|
||||||
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
||||||
|
@ -23,6 +23,7 @@ extern "C" {
|
|||||||
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
||||||
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
||||||
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
||||||
|
#define HTML_PI_NODE XML_PI_NODE
|
||||||
|
|
||||||
htmlDocPtr htmlNewDoc (const xmlChar *URI,
|
htmlDocPtr htmlNewDoc (const xmlChar *URI,
|
||||||
const xmlChar *ExternalID);
|
const xmlChar *ExternalID);
|
||||||
|
@ -23,6 +23,7 @@ extern "C" {
|
|||||||
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
||||||
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
||||||
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
||||||
|
#define HTML_PI_NODE XML_PI_NODE
|
||||||
|
|
||||||
htmlDocPtr htmlNewDoc (const xmlChar *URI,
|
htmlDocPtr htmlNewDoc (const xmlChar *URI,
|
||||||
const xmlChar *ExternalID);
|
const xmlChar *ExternalID);
|
||||||
|
10
valid.c
10
valid.c
@ -3286,7 +3286,7 @@ xmlValidateElementType(xmlValidCtxtPtr ctxt) {
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if (CONT == NULL) return(-1);
|
if (CONT == NULL) return(-1);
|
||||||
if (NODE->type == XML_ENTITY_REF_NODE)
|
if ((NODE != NULL) && (NODE->type == XML_ENTITY_REF_NODE))
|
||||||
return(-2);
|
return(-2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3643,7 +3643,7 @@ xmlSprintfElements(char *buf, xmlNodePtr node, int glob) {
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
||||||
xmlElementContentPtr cont, int warn) {
|
xmlElementContentPtr cont, int warn, const xmlChar *name) {
|
||||||
int ret;
|
int ret;
|
||||||
xmlNodePtr repl = NULL, last = NULL, cur, tmp;
|
xmlNodePtr repl = NULL, last = NULL, cur, tmp;
|
||||||
|
|
||||||
@ -3757,10 +3757,10 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
|||||||
else
|
else
|
||||||
xmlSprintfElements(list, child, 1);
|
xmlSprintfElements(list, child, 1);
|
||||||
|
|
||||||
if ((child->parent != NULL) && (child->parent->name != NULL)) {
|
if (name != NULL) {
|
||||||
VERROR(ctxt->userData,
|
VERROR(ctxt->userData,
|
||||||
"Element %s content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
"Element %s content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
||||||
child->parent->name, expr, list);
|
name, expr, list);
|
||||||
} else {
|
} else {
|
||||||
VERROR(ctxt->userData,
|
VERROR(ctxt->userData,
|
||||||
"Element content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
"Element content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
||||||
@ -3996,7 +3996,7 @@ child_ok:
|
|||||||
case XML_ELEMENT_TYPE_ELEMENT:
|
case XML_ELEMENT_TYPE_ELEMENT:
|
||||||
child = elem->children;
|
child = elem->children;
|
||||||
cont = elemDecl->content;
|
cont = elemDecl->content;
|
||||||
ret = xmlValidateElementContent(ctxt, child, cont, 1);
|
ret = xmlValidateElementContent(ctxt, child, cont, 1, elem->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user