XSL doesn't evaluate all items in a template tag

Bug #1759843 reported by Blah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Invalid
Undecided
Unassigned

Bug Description

$ xsltproc blah.xsl blah.xml
<?xml version="1.0"?>
<span xmlns:fo="http://www.w3.org/1999/XSL/Format" class="testo_link">- </span><a xmlns:fo="http://www.w3.org/1999/XSL/Format" class="contents_link" href="REFNODEID3025915" target="_parent">7055B54  under-engine guard - r r</a>

For whatever reason, lxml only outputs the <span> tag while omitting the <a>, see test files attached.

>>> from lxml import etree
>>> xml = etree.parse("../blah.xml")
>>> xsl = etree.parse("../blah.xsl")
>>> transform = etree.XSLT(xsl)
>>> etree.tostring(transform(xml))
b'<span xmlns:fo="http://www.w3.org/1999/XSL/Format" class="testo_link">-&#160;</span>'

Revision history for this message
Blah (blahyada) wrote :
Revision history for this message
Blah (blahyada) wrote :
Revision history for this message
scoder (scoder) wrote :

lxml tries not to output non-XML when you ask it to output XML.
Call bytes() on the transformation result if you want the generated XSLT output as configured in the stylesheet.

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

Other bug subscribers

Remote bug watches

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