From bb5c8d8a8bd1beae84ae0171e209f529c2df4c19 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 28 Mar 2003 11:23:00 +0000 Subject: [PATCH] fix bug #109395 as pointed out by Ben Phillips and avoid some warnings * python/libxsl.py: fix bug #109395 as pointed out by Ben Phillips and avoid some warnings when loading the python modules on non Linux platforms. * libxslt/transform.c: fix a bug introduced in the document lookup and exhibited by the keys test. Daniel --- ChangeLog | 8 ++++++++ libxslt/transform.c | 6 ++++-- python/libxsl.py | 13 +++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f8eaee5..b3deb366 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 28 12:19:35 CET 2003 Daniel Veillard + + * python/libxsl.py: fix bug #109395 as pointed out by Ben Phillips + and avoid some warnings when loading the python modules on non + Linux platforms. + * libxslt/transform.c: fix a bug introduced in the document lookup + and exhibited by the keys test. + Wed Mar 26 22:41:00 CET 2003 Daniel Veillard * tests/docs/Makefile.am tests/docs/bug-113.* diff --git a/libxslt/transform.c b/libxslt/transform.c index 3f93f6ca..255d6a8b 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -3064,7 +3064,8 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node, (list->nodeTab[i]->doc->doc)!=ctxt->xpathCtxt->doc) { /* The nodeset is from another document, so must change */ ctxt->xpathCtxt->doc=list->nodeTab[i]->doc->doc; - if (list->nodeTab[i]->doc->name != NULL) { + if ((list->nodeTab[i]->doc->name != NULL) || + (list->nodeTab[i]->doc->URL != NULL)) { ctxt->document = xsltFindDocument(ctxt, list->nodeTab[i]->doc->doc); ctxt->xpathCtxt->node = list->nodeTab[i]; @@ -3419,7 +3420,8 @@ xsltForEach(xsltTransformContextPtr ctxt, xmlNodePtr node, (list->nodeTab[i]->doc->doc)!=ctxt->xpathCtxt->doc) { /* The nodeset is from another document, so must change */ ctxt->xpathCtxt->doc=list->nodeTab[i]->doc->doc; - if (list->nodeTab[i]->doc->name != NULL) { + if ((list->nodeTab[i]->doc->name != NULL) || + (list->nodeTab[i]->doc->URL != NULL)) { ctxt->document = xsltFindDocument(ctxt, list->nodeTab[i]->doc->doc); ctxt->xpathCtxt->node = list->nodeTab[i]; diff --git a/python/libxsl.py b/python/libxsl.py index 8fd263e6..8190fb3a 100644 --- a/python/libxsl.py +++ b/python/libxsl.py @@ -17,18 +17,19 @@ else: try: import os osname = os.uname()[0] - if osname == 'Linux': + if osname == 'Linux' or osname == 'SunOS': RTLD_GLOBAL = 0x00100 RTLD_NOW = 0x00002 # # is there a better method ? # - else: - print "libxslt could not guess RTLD_GLOBAL and RTLD_NOW " + \ - "on this platform: %s" % (osname) +# else: +# print "libxslt could not guess RTLD_GLOBAL and RTLD_NOW " + \ +# "on this platform: %s" % (osname) except: - print "libxslt could not guess RTLD_GLOBAL and RTLD_NOW " + \ - "on this platform: %s" % (osname) + pass +# print "libxslt could not guess RTLD_GLOBAL and RTLD_NOW " + \ +# "on this platform: %s" % (osname) if RTLD_GLOBAL != -1 and RTLD_NOW != -1: try: