lxml silently fails XSL transformation

Bug #208339 reported by Andrew Stromnov
2
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Medium
Unassigned

Bug Description

Test (in attach) silently fails second XSL transformation when 'value' equals to some XML. Tested with latest lxml 1.x and 2.x.

Output:

stromnov@desktop:~$ python lxml-test.py
ET.__version__ = 2.1.alpha1-53012

<xml>
    <child>
      <subchild>
        text
      </subchild>
    ival</child>
  </xml>

None

Revision history for this message
Andrew Stromnov (stromnov) wrote :
Revision history for this message
scoder (scoder) wrote :

libxslt returns a result document here, although normally you'd want to get a NULL result signaling an error.

I'll dig into this.

Changed in lxml:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
scoder (scoder) wrote :

Quick update: I asked on the libxslt list to figure out how to work around things like this. It's not obvious at all to me.

http://comments.gmane.org/gmane.comp.gnome.lib.xslt/3550?set_lines=100000

Revision history for this message
scoder (scoder) wrote :

Ok, there are two problems here, one in libxslt and one in lxml

1) You forgot to specify the two parameters in your stylesheet using <xsl:param>. Sadly, libxslt does not signal this as an error at compile time. I filed a bug report there.

http://bugzilla.gnome.org/show_bug.cgi?id=528224

2) In libxslt, the return state "STOPPED" is not, as you might expect, the status when the processor has terminated, but the state when it has stopped due to an error that was not considered fatal - but still stopped short (no idea what that is supposed to be good for). lxml did not take this into account and only signaled the "ERROR" state. This will be fixed in lxml 2.1.

Changed in lxml:
status: Confirmed → Fix Committed
Revision history for this message
scoder (scoder) wrote :

fixed in 2.0.5

Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.