Project

Profile

Help

Bug #5850 » test_saxonche_compile.py

Daniel Haley, 2023-01-23 19:09

 
from saxonche import PySaxonProcessor


with PySaxonProcessor(license=False) as saxon_proc:

xsltproc = saxon_proc.new_xslt30_processor()
executable = xsltproc.compile_stylesheet(stylesheet_file="test_compile.xsl")

if xsltproc.exception_occurred:
print(f"error code: {xsltproc.error_code}\n"
f"error msg: {xsltproc.error_message}")
raise Exception(f"XSLT process exception(s) while compiling")

print(executable)
(2-2/2)