Project

Profile

Help

Bug #6084

closed

Exception: Initial template parameters can only be of type PyXdmValue

Added by O'Neil Delpratt 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
Python API
Start date:
2023-06-19
Due date:
% Done:

100%

Estimated time:
Found in version:
12.2
Fixed in version:
12.3
Platforms:

Description

When I run the code with dict of PyXdmValues:

environment.sheet.set_initial_template_parameters(False, init_params)

The following exception is thrown:

Exception: Initial template parameters can only be of type PyXdmValue

The code for set_initial_template_parameters is looking only for PyAtomicValues which is clearly wrong.

Actions #1

Updated by O'Neil Delpratt 9 months ago

I have fixed up the python code to accept XdmValue and its sub-types. But now hitting the following exception:

NullPointer exception found: java.lang.NullPointerException
	at net.sf.saxon.s9api.Xslt30Transformer.setInitialTemplateParameters(Xslt30Transformer.java:269)
	at net.sf.saxon.option.cpp.Xslt30Processor.applyXsltTransformerProperties(Xslt30Processor.java:1397)
	at net.sf.saxon.option.cpp.Xslt30Processor.callTemplateReturningValue(Xslt30Processor.java:1023)
. Line number: -1
Actions #2

Updated by O'Neil Delpratt 9 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Bug fix committed to repository.

The path of building Xdm objects via the ProcessorDataAccumulator class for C++ constructed Xdm values was not correctly handled. Fix applied to SaxonCAPI.convertObjectToXdmValue() method which is used to convert Xdm objects coming from C++.

Tested in the python test suite driver

Actions #3

Updated by O'Neil Delpratt 8 months ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 12.3

Bug fix applied in the SaxonC 12.3 maintenance release.

Please register to edit this issue

Also available in: Atom PDF