Project

Profile

Help

Bug #4134

closed

XQuery: default collation and starts-with causes fatal error cannot be cast to net.sf.saxon.lib.SubstringMatcher

Added by Boris Lehečka about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2019-02-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

When default collation is declared, using starts-with function with two parameters, i.e. starts-with($arg1, $arg2), causes the error net.sf.saxon.expr.sort.SimpleCollation cannot be cast to net.sf.saxon.lib.SubstringMatcher.

There are two solutions:

  1. removing default collation declaration
  2. adding collation argument to starts-with function, for example starts-with($arg1, $arg2, "http://saxon.sf.net/collation?lang=cs-CZ")

I would expect that default collation is used for comparison within starts-with function without "redefining" it.

Am I wrong?

Example file with commented code is attached.


Files

collation-error.xquery (414 Bytes) collation-error.xquery default collation and starts-with error example Boris Lehečka, 2019-02-13 11:14

Please register to edit this issue

Also available in: Atom PDF