lxml is reporting "<string>:0:0:ERROR:XSLT:ERR_OK: unknown error“ when it should not.

Bug #1567633 reported by Rainer Hörbe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Triaged
Undecided
Unassigned

Bug Description

Style sheets generated from schematron do not work until they are reformatted with Oxygen.

Python : sys.version_info(major=3, minor=4, micro=4, releaselevel='final', serial=0)
lxml.etree : (3, 6, 0, 0)
libxml used : (2, 9, 2)
libxml compiled : (2, 9, 2)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)

import lxml.etree as etree
transform = etree.XSLT(etree.parse('rules/schtron/rule02W.xsl'))
md_dom = etree.parse('testdata/rule02W_fail.xml')
out_dom = transform(md_dom)
print(transform.error_log.last_error)
<string>:0:0:ERROR:XSLT:ERR_OK: unknown error

workaround:

Details description and test data here:
https://github.com/rhoerbe/lxml-bug

Revision history for this message
scoder (scoder) wrote :

It's difficult to find the "most appropriate" error in XSLT output, because what libxslt generates is often not very informative.
PR welcome that improves the selectivity specifically for reported XSLT errors.

Changed in lxml:
status: New → Triaged
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.