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

store the line numbder in element->content, may break some software, need

* DOCBparser.c HTMLparser.c HTMLtree.c SAX.c debugXML.c parser.c
  tree.c xpointer.c: store the line numbder in element->content,
  may break some software, need a configuration mechanism
Daniel
This commit is contained in:
Daniel Veillard
2001-07-12 01:20:08 +00:00
parent 96037891e6
commit 7db3773a5c
10 changed files with 84 additions and 115 deletions

View File

@ -538,7 +538,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
}
return;
}
if ((cur->content == NULL) && (cur->children == NULL)) {
if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
(cur->children == NULL)) {
if ((info != NULL) && (info->saveEndTag != 0) &&
(xmlStrcmp(BAD_CAST info->name, BAD_CAST "html")) &&
(xmlStrcmp(BAD_CAST info->name, BAD_CAST "body"))) {
@ -557,7 +558,7 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
return;
}
xmlBufferWriteChar(buf, ">");
if (cur->content != NULL) {
if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
xmlChar *buffer;
#ifndef XML_USE_BUFFER_CONTENT
@ -1039,7 +1040,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
}
return;
}
if ((cur->content == NULL) && (cur->children == NULL)) {
if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
(cur->children == NULL)) {
if ((info != NULL) && (info->saveEndTag != 0) &&
(xmlStrcmp(BAD_CAST info->name, BAD_CAST "html")) &&
(xmlStrcmp(BAD_CAST info->name, BAD_CAST "body"))) {
@ -1060,7 +1062,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
return;
}
xmlOutputBufferWriteString(buf, ">");
if (cur->content != NULL) {
if ((cur->type != XML_ELEMENT_NODE) &&
(cur->content != NULL)) {
/*
* Uses the OutputBuffer property to automatically convert
* invalids to charrefs