Project

Profile

Help

Bug #6606

closed

With XPath, although cwd is set, static-base-uri() is empty

Added by Martin Honnen 15 days ago. Updated 10 days ago.

Status:
Resolved
Priority:
Normal
Category:
Python API
Start date:
2024-12-07
Due date:
% Done:

100%

Estimated time:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Found in version:
Fixed in version:
SaxonC Languages:
All
SaxonC Platforms:
All
SaxonC Architecture:

Description

The Python program using SaxonC HE 12.5

from saxonche import *

from pathlib import Path

xquery1 = '"Static base uri : " || static-base-uri()'

with PySaxonProcessor() as saxon_proc:
    print(saxon_proc.version)

    xpathProcessor = saxon_proc.new_xpath_processor()

    workingDirPath = str(Path.cwd().absolute())

    print(workingDirPath)

    xpathProcessor.set_cwd(workingDirPath)

    result = xpathProcessor.evaluate(xquery1)

    print(result)

prints out static base URI as empty although I use xpathProcessor.set_cwd(workingDirPath) to attempt to set it.

Output:

SaxonC-HE 12.5 from Saxonica
C:\Users\marti\PycharmProjects\SaxonC12CompileXsltFromStringTest1
Static base uri :

Files

evaluateXPathFromStringTest1.py (433 Bytes) evaluateXPathFromStringTest1.py Martin Honnen, 2024-12-07 15:17

Related issues

Related to SaxonC - Bug #6605: Query using static-base-uri() compiled from string gives saxonche.PySaxonApiError: NullPointer exception found: java.lang.NullPointerExceptionResolvedO'Neil Delpratt2024-12-07

Actions

Please register to edit this issue

Also available in: Atom PDF