Actions
Bug #6662
openjava.lang.NullPointerException found for saxon:line-number
Status:
New
Priority:
Normal
Assignee:
-
Category:
s9api API
Sprint/Milestone:
-
Start date:
2025-01-21
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
Given this simple XML document:
<root>
<item>a</item>
<item>b</item>
<item>c</item>
</root>
If I run the below command which is an incorrect path in the XML doc:
-qs:"saxon:line-number((//item1)[1])" -s:sample.xml -sa
The following exception is thrown:
Exception in thread "main" java.lang.NullPointerException
at com.saxonica.functions.extfn.VendorFunctionSetPE$LineNumber.call(VendorFunctionSetPE.java:778)
at net.sf.saxon.expr.SystemFunctionCall$SystemFunctionCallElaborator.lambda$elaborateForPull$1(SystemFunctionCall.java:605)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:624)
at net.sf.saxon.sxpath.XPathExpression.evaluateSingle(XPathExpression.java:210)
at net.sf.saxon.s9api.XPathSelector.evaluateSingle(XPathSelector.java:258)
at net.sf.saxon.option.cpp.SaxonCAPI.testj(SaxonCAPI.java:1938)
at net.sf.saxon.option.cpp.SaxonCAPI.main(SaxonCAPI.java:1986)
Please register to edit this issue
Actions