Project

Profile

Help

Bug #6662

Updated by O'Neil Delpratt about 20 hours ago

Given this simple XML document: 

 ``` xml 
 <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 -s:cat.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) 
 ```

Back