XSL doesn't evaluate all items in a template tag

Bug #1759843 reported by Blah on 2018-03-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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>'

Blah (blahyada) wrote :
Blah (blahyada) wrote :
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  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments