Commit 66870c71 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

applied an improvement to xmlGetLineNo() from Keith Isdale Daniel

* debugXML.c: applied an improvement to xmlGetLineNo() from
  Keith Isdale
Daniel
parent ffe09c94
Mon Nov 5 20:26:41 CET 2001 Daniel Veillard <daniel@veillard.com>
* debugXML.c: applied an improvement to xmlGetLineNo() from
Keith Isdale
Mon Nov 5 15:20:16 CET 2001 Daniel Veillard <daniel@veillard.com>
* catalog.c: dohhhh XML catalog add and remove ops were broken too.
......
......@@ -1194,11 +1194,13 @@ xmlGetLineNo(xmlNodePtr node)
if (node->type == XML_ELEMENT_NODE)
result = (long) node->content;
else if ((node->prev != NULL) &&
(node->prev->type == XML_ELEMENT_NODE))
result = (long) node->prev->content;
((node->prev->type == XML_ELEMENT_NODE) ||
(node->prev->type == XML_TEXT_NODE)))
result = xmlGetLineNo(node->prev);
else if ((node->parent != NULL) &&
(node->parent->type == XML_ELEMENT_NODE))
result = (long) node->parent->content;
((node->parent->type == XML_ELEMENT_NODE) ||
(node->parent->type == XML_TEXT_NODE)))
result = xmlGetLineNo(node->parent);
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment