Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix compile error reporting for XSLT stylesheet compilation

--HG--
extra : transplant_source : %97%25%BB%D6%91%CA%2AD%E2%8D%C0%3B7%8B%CC%88%15%C4%C8%A2
  • Loading branch information...
commit ec5a50eab2e1f73205a0d8a69606086179355b83 1 parent 69fdaf3
@scoder scoder authored
Showing with 19 additions and 1 deletion.
  1. +15 −0 CHANGES.txt
  2. +1 −0  src/lxml/xslt.pxd
  3. +3 −1 src/lxml/xslt.pxi
View
15 CHANGES.txt
@@ -2,6 +2,21 @@
lxml changelog
==============
+2.3.4 (?)
+==================
+
+Features added
+--------------
+
+Bugs fixed
+----------
+
+* XSLT stylesheet compilation could ignore compilation errors.
+
+Other changes
+--------------
+
+
2.3.3 (2012-01-04)
==================
View
1  src/lxml/xslt.pxd
@@ -19,6 +19,7 @@ cdef extern from "libxslt/xsltInternals.h":
ctypedef struct xsltStylesheet:
char* encoding
xmlDoc* doc
+ int errors
ctypedef struct xsltTransformContext:
xsltStylesheet* style
View
4 src/lxml/xslt.pxi
@@ -394,8 +394,10 @@ cdef class XSLT:
c_style = xslt.xsltParseStylesheetDoc(c_doc)
self._error_log.disconnect()
- if c_style is NULL:
+ if c_style is NULL or c_style.errors:
tree.xmlFreeDoc(c_doc)
+ if c_style is not NULL:
+ xslt.xsltFreeStylesheet(c_style)
self._xslt_resolver_context._raise_if_stored()
# last error seems to be the most accurate here
if self._error_log.last_error is not None and \
Please sign in to comment.
Something went wrong with that request. Please try again.