Re: [xsl] Stylesheet works in oXygen fails in Python with Saxonc

Subject: Re: [xsl] Stylesheet works in oXygen fails in Python with Saxonc
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Jan 2025 22:09:06 -0000
On 21/01/2025 23:07, Martin Honnen martin.honnen@xxxxxx wrote:
You seem to have a global variable or parameter that tries to access the
global context item, so far you have only set the initial-match
selection, use e.g.

B xdm_doc = proc.parse_xml(xml_file_name='nav-short.xml')

and then set both the initial match selection as well as the global
context item to that e.g.

B executable.set_initial_match_selection(xdm_value=xdm_doc)

B executable.set_global_context_item(xdm_item=xdm_doc)


Or use
https://www.saxonica.com/saxon-c/doc12/html/saxonc.html#PyXsltExecutable-tran
sform_to_value
e.g.

B executable_transform_to_value(source_file='nav-short.xml')

Current Thread