diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-07-12 01:20:08 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-07-12 01:20:08 +0000 |
commit | 7db3773a5cdafd122df5b69ba90be82535d46069 (patch) | |
tree | d981c827684eb3a744a7d5d0b3f38d304a715f7a /xpointer.c | |
parent | 96037891e6b5c45f2d15601b36ed00fe5404f08b (diff) | |
download | android_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.tar.gz android_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.tar.bz2 android_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.zip |
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
Diffstat (limited to 'xpointer.c')
-rw-r--r-- | xpointer.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1421,7 +1421,8 @@ xmlXPtrBuildRangeNodeList(xmlXPathObjectPtr range) { } } else if ((cur == start) && (list == NULL) /* looks superfluous but ... */ ) { - if (cur->type == XML_TEXT_NODE) { + if ((cur->type == XML_TEXT_NODE) || + (cur->type == XML_CDATA_SECTION_NODE)) { const xmlChar *content = cur->content; if (content == NULL) { @@ -2317,7 +2318,8 @@ xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) { * We should have a text (or cdata) node ... */ len = 0; - if (cur->content != NULL) { + if ((cur->type != XML_ELEMENT_NODE) && + (cur->content != NULL)) { #ifndef XML_USE_BUFFER_CONTENT len = xmlStrlen(cur->content); #else @@ -2383,7 +2385,8 @@ xmlXPtrMatchString(const xmlChar *string, xmlNodePtr start, int startindex, while (stringlen > 0) { if ((cur == *end) && (pos + stringlen > *endindex)) return(0); - if (cur->content != NULL) { + + if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { #ifndef XML_USE_BUFFER_CONTENT len = xmlStrlen(cur->content); #else @@ -2481,7 +2484,7 @@ xmlXPtrSearchString(const xmlChar *string, xmlNodePtr *start, int *startindex, stringlen = xmlStrlen(string); while (cur != NULL) { - if (cur->content != NULL) { + if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { #ifndef XML_USE_BUFFER_CONTENT len = xmlStrlen(cur->content); #else @@ -2578,7 +2581,8 @@ xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) { while (cur != NULL) { if (cur->last != NULL) cur = cur->last; - else if (cur->content != NULL) { + else if ((cur->type != XML_ELEMENT_NODE) && + (cur->content != NULL)) { #ifndef XML_USE_BUFFER_CONTENT len = xmlStrlen(cur->content); #else |