summaryrefslogtreecommitdiff
path: root/libxml2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-12-20 01:29:52 +0100
committerJan Holesovsky <kendy@suse.cz>2010-12-20 01:29:52 +0100
commitb0767458c4260141cbd60b86e7021a3a35c510a3 (patch)
tree35f0f950bb790d2ac795773a144d26c760bbbeab /libxml2
parent60889716192d13bdc37b2375c3c20969de8a9cd8 (diff)
parentaad785b1bbc18866e65517a45bd3655e6a559fea (diff)
Merge commit 'libreoffice-3.3.0.2'
Diffstat (limited to 'libxml2')
-rw-r--r--libxml2/libxml2-xpath.patch49
-rw-r--r--libxml2/makefile.mk1
2 files changed, 50 insertions, 0 deletions
diff --git a/libxml2/libxml2-xpath.patch b/libxml2/libxml2-xpath.patch
new file mode 100644
index 000000000000..e02982f16efe
--- /dev/null
+++ b/libxml2/libxml2-xpath.patch
@@ -0,0 +1,49 @@
+--- misc/libxml2-2.7.6/xpath.c
++++ misc/build/libxml2-2.7.6/xpath.c
+@@ -8104,9 +8104,17 @@
+ xmlNodePtr
+ xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+- if (cur != NULL && cur->children != NULL)
+- return cur->children ;
+- if (cur == NULL) cur = ctxt->context->node;
++ if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) &&
++ (cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL))
++ return(cur->children);
++
++ if (cur == NULL) {
++ cur = ctxt->context->node;
++ if (cur->type == XML_NAMESPACE_DECL)
++ return(NULL);
++ if (cur->type == XML_ATTRIBUTE_NODE)
++ cur = cur->parent;
++ }
+ if (cur == NULL) return(NULL) ; /* ERROR */
+ if (cur->next != NULL) return(cur->next) ;
+ do {
+@@ -8160,8 +8168,13 @@
+ xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
+ {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+- if (cur == NULL)
++ if (cur == NULL) {
+ cur = ctxt->context->node;
++ if (cur->type == XML_NAMESPACE_DECL)
++ return(NULL);
++ if (cur->type == XML_ATTRIBUTE_NODE)
++ return(cur->parent);
++ }
+ if (cur == NULL)
+ return (NULL);
+ if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
+@@ -8205,8 +8218,8 @@
+ cur = ctxt->context->node;
+ if (cur == NULL)
+ return (NULL);
+- if (cur->type == XML_NAMESPACE_DECL)
+- cur = (xmlNodePtr)((xmlNsPtr)cur)->next;
++ if (cur->type == XML_NAMESPACE_DECL)
++ return (NULL);
+ ctxt->ancestor = cur->parent;
+ }
+ if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
index c54d00e6f800..70cabe58384d 100644
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -51,6 +51,7 @@ TARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2
PATCH_FILES=libxml2-configure.patch \
libxml2-mingw.patch \
libxml2-gnome599717.patch \
+ libxml2-xpath.patch \
libxml2-global-symbols.patch \
libxml2-aix.patch \
libxml2-vc10.patch