forked from pool/libxml2
resolve conflict
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=26
This commit is contained in:
@@ -25,7 +25,7 @@ Group: Development/Libraries/Python
|
||||
AutoReqProv: on
|
||||
Summary: Python Bindings for libxml2
|
||||
Version: 2.7.7
|
||||
Release: 7
|
||||
Release: 8
|
||||
Source: libxml2-%{version}.tar.bz2
|
||||
Source1: libxml2-python-rpmlintrc
|
||||
%py_requires
|
||||
|
||||
@@ -6,54 +6,55 @@ Subject: [PATCH] Fix the semantic of XPath axis for namespace/attribute context
|
||||
The processing of namespace and attributes nodes was not compliant
|
||||
to the XPath-1.0 specification
|
||||
---
|
||||
xpath.c | 20 ++++++++++++++++----
|
||||
1 files changed, 16 insertions(+), 4 deletions(-)
|
||||
xpath.c | 23 ++++++++++++++++++-----
|
||||
1 file changed, 18 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: libxml2-2.7.7/xpath.c
|
||||
===================================================================
|
||||
--- libxml2-2.7.7.orig/xpath.c
|
||||
+++ libxml2-2.7.7/xpath.c
|
||||
@@ -8106,8 +8106,16 @@ xmlXPathNextPrecedingSibling(xmlXPathPar
|
||||
@@ -8106,9 +8106,17 @@ xmlXPathNextPrecedingSibling(xmlXPathPar
|
||||
xmlNodePtr
|
||||
xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
|
||||
if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
|
||||
- if (cur != NULL && cur->children != NULL)
|
||||
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
|
||||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
|
||||
+ return(NULL);
|
||||
+ if (cur != NULL) {
|
||||
+ if ((cur->type == XML_ATTRIBUTE_NODE) ||
|
||||
+ (cur->type == XML_NAMESPACE_DECL))
|
||||
- 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->children != NULL)
|
||||
return cur->children ;
|
||||
+ if (cur->type == XML_ATTRIBUTE_NODE)
|
||||
+ cur = cur->parent;
|
||||
+ }
|
||||
if (cur == NULL) cur = ctxt->context->node;
|
||||
if (cur == NULL) return(NULL) ; /* ERROR */
|
||||
if (cur->next != NULL) return(cur->next) ;
|
||||
@@ -8162,6 +8170,9 @@ xmlNodePtr
|
||||
do {
|
||||
@@ -8162,8 +8170,13 @@ xmlNodePtr
|
||||
xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
|
||||
{
|
||||
if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
|
||||
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
|
||||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
|
||||
+ return(NULL);
|
||||
if (cur == 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)
|
||||
@@ -8203,12 +8214,13 @@ xmlXPathNextPrecedingInternal(xmlXPathPa
|
||||
xmlNodePtr cur)
|
||||
{
|
||||
if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
|
||||
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
|
||||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
|
||||
+ return(NULL);
|
||||
if (cur == NULL) {
|
||||
cur = ctxt->context->node;
|
||||
return (NULL);
|
||||
if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
|
||||
@@ -8208,7 +8221,7 @@ xmlXPathNextPrecedingInternal(xmlXPathPa
|
||||
if (cur == NULL)
|
||||
return (NULL);
|
||||
- if (cur->type == XML_NAMESPACE_DECL)
|
||||
if (cur->type == XML_NAMESPACE_DECL)
|
||||
- cur = (xmlNodePtr)((xmlNsPtr)cur)->next;
|
||||
+ return (NULL);
|
||||
ctxt->ancestor = cur->parent;
|
||||
}
|
||||
if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
|
||||
|
||||
@@ -25,7 +25,7 @@ Group: System/Libraries
|
||||
Summary: A Library to Manipulate XML Files
|
||||
Url: http://xmlsoft.org
|
||||
Version: 2.7.7
|
||||
Release: 7
|
||||
Release: 8
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source2: baselibs.conf
|
||||
Patch1: noxref.patch
|
||||
@@ -103,6 +103,7 @@ progress.
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
--with-html-subdir=packages/%{name}/html \
|
||||
|
||||
Reference in New Issue
Block a user