Actions
Bug #6439
closedAttributeError: 'saxonche.PyXdmFunctionItem' object has no attribute 'as_list'
Start date:
2024-05-24
Due date:
% Done:
100%
Estimated time:
Applies to branch:
Fix Committed on Branch:
12
Fixed in Maintenance Release:
Found in version:
12.4.2
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
In the python script:
from saxonche import PySaxonProcessor
with PySaxonProcessor() as processor:
xpath_processor = processor.new_xpath_processor()
xpath_result = xpath_processor.evaluate_single('array { 1 to 5 }')
print(type(xpath_result))
array_as_list = [item.head.get_atomic_value() for item in xpath_result.as_list()]
print(array_as_list)
The xpath_result should be of type PyXdmArray
but the evaluate_single
method is failing the correct conversion.
Related issues
Updated by O'Neil Delpratt 7 months ago
- Copied from Bug #6437: PyXdmValue of size 1 where the item is an XDM array returns that item as a PyXdmFunctionItem and calling get_array_value() on that item gives error AttributeError: 'saxonche.PyXdmArray' object has no attribute 'derivednptr' added
Updated by O'Neil Delpratt 7 months ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Bug fixed in the Python extension. Problem found in the enumeration values for XdmType.
Updated by O'Neil Delpratt 6 months ago
- Status changed from Resolved to Closed
- Fixed in version set to 12.5
Bug fix applied in the Saxon 12.5 Maintenance release.
Please register to edit this issue
Actions