Project

Profile

Help

Bug #6059

closed

Bug on "-" castable to xs:duration

Added by Shuxin Li over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2023-06-02
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

Tested on Saxon HE 12.2 from Java,

With xml document:

and XPath query: //P/@y castable as xs:duration

Saxon gives java.util.NoSuchElementException: Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:347) at net.sf.saxon.value.DurationValue.makeDuration(DurationValue.java:225) at net.sf.saxon.value.DurationValue.makeDuration(DurationValue.java:208) at net.sf.saxon.type.StringConverter$StringToDuration.convertString(StringConverter.java:607) at net.sf.saxon.type.StringConverter.convert(StringConverter.java:82) at net.sf.saxon.expr.CastableExpression.isCastable(CastableExpression.java:207) at net.sf.saxon.expr.CastableExpression.access$100(CastableExpression.java:29) at net.sf.saxon.expr.CastableExpression$CastableExpressionElaborator.lambda$elaborateForBoolean$0(CastableExpression.java:277) at net.sf.saxon.expr.elab.BooleanElaborator.lambda$elaborateForPull$0(BooleanElaborator.java:25) at net.sf.saxon.query.XQueryExpression.getExpressionIterator(XQueryExpression.java:404) at net.sf.saxon.query.XQueryExpression.iterator(XQueryExpression.java:381) at net.sf.saxon.s9api.XQueryEvaluator.evaluate(XQueryEvaluator.java:523) at Main.execute(Main.java:64) at Main.main(Main.java:20)

Process finished with exit code 1

Should return false.

Please register to edit this issue

Also available in: Atom PDF