[Lxml-checkins] r43574 - in lxml/trunk: . src/lxml

scoder at codespeak.net scoder at codespeak.net
Wed May 23 16:11:58 CEST 2007


Author: scoder
Date: Wed May 23 16:11:57 2007
New Revision: 43574

Modified:
   lxml/trunk/CHANGES.txt
   lxml/trunk/src/lxml/xslt.pxi
Log:
pass resolver context on to imported XSLT documents

Modified: lxml/trunk/CHANGES.txt
==============================================================================
--- lxml/trunk/CHANGES.txt	(original)
+++ lxml/trunk/CHANGES.txt	Wed May 23 16:11:57 2007
@@ -44,6 +44,8 @@
 Bugs fixed
 ----------
 
+* XSLT parsing failed to pass resolver context on to imported documents
+
 * ``ETXPath`` was missing the ``regexp`` keyword argument
 
 * passing '' as XPath namespace prefix did not raise an error

Modified: lxml/trunk/src/lxml/xslt.pxi
==============================================================================
--- lxml/trunk/src/lxml/xslt.pxi	(original)
+++ lxml/trunk/src/lxml/xslt.pxi	Wed May 23 16:11:57 2007
@@ -141,6 +141,8 @@
     c_doc = _xslt_resolve_stylesheet(c_uri, c_pcontext)
     if c_doc is not NULL:
         python.PyGILState_Release(gil_state)
+        if c_type == xslt.XSLT_LOAD_STYLESHEET:
+            c_doc._private = c_pcontext
         return c_doc
 
     c_doc = _xslt_resolve_from_python(c_uri, c_pcontext, parse_options, &error)
@@ -151,6 +153,8 @@
             _xslt_store_resolver_exception(c_uri, c_pcontext, c_type)
 
     python.PyGILState_Release(gil_state)
+    if c_doc is not NULL and c_type == xslt.XSLT_LOAD_STYLESHEET:
+        c_doc._private = c_pcontext
     return c_doc
 
 cdef xslt.xsltDocLoaderFunc XSLT_DOC_DEFAULT_LOADER


More information about the lxml-checkins mailing list