[libxml2] 583439 missing line numbers in push mode



commit 852505b38f778d3909c6ae8e775ca3594a415015
Author: Daniel Veillard <veillard redhat com>
Date:   Sun Aug 23 15:44:48 2009 +0200

    583439 missing line numbers in push mode
    
    * parser.c: use the line number stored in the node itself if present
      for end of tag line error reports

 parser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/parser.c b/parser.c
index dc9c14d..dfdde8f 100644
--- a/parser.c
+++ b/parser.c
@@ -9181,6 +9181,8 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
      */
     if (name != (xmlChar*)1) {
         if (name == NULL) name = BAD_CAST "unparseable";
+        if ((line == 0) && (ctxt->node != NULL))
+            line = ctxt->node->line;
         xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
 		     "Opening and ending tag mismatch: %s line %d and %s\n",
 		                ctxt->name, line, name);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]