Bug #5162
closedFailure when using collations in SaxonJS.XPath.evaluate
100%
Description
Raised here: https://saxonica.plan.io/boards/5/topics/8361?pn=1&r=8379#message-8379
I was hoping to be able to specify a collation URI as the second parameter to fn:sort when using SaxonJS.XPath.evaluate, but it seems to throw an error: "Cannot read properties of null (reading 'toString')".
Updated by Debbie Lockett almost 3 years ago
Note that I added a couple of tests back in December, but didn't manage to reproduce the problem (as commented in the initial forum post). See browser test xpath/evaluate05, and Node.js test xp019 (in xp/mocha_test.js).
Updated by Debbie Lockett almost 3 years ago
- Status changed from New to In Progress
Further test added (nodejs/iss5162 - see the "fn:sort using UCA collation" test currently marked skip) which actually reproduces the issue when using SaxonJS.XPath.evaluate
from Node.js.
Updated by Debbie Lockett almost 3 years ago
- Assignee changed from Michael Kay to Debbie Lockett
The error is thrown from within an internal call on resolve-uri
(for the collation URI). Apparently in this case, the supplied base
is null (i.e. args[1]
is an empty sequence), which is not being handled correctly in the resolve-uri
code. The base
comes from the evalContext.fixed.staticBaseURI
(in XPathEval evaluate
), which is null for the Node.js platform (but not for the browser platform - which explains why test xpath/evaluate05 didn't reproduce the problem).
Updated by Debbie Lockett almost 3 years ago
- Status changed from In Progress to Resolved
- Applies to JS Branch 2 added
- Fix Committed on JS Branch 2 added
Fix committed in resolve-uri
code in CoreFn.js.
Updated by Debbie Lockett over 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to SaxonJS 2.4
Bug fix applied in the SaxonJS 2.4 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page