In https://saxonica.plan.io/boards/5/topics/8129?pn=1, Martin Honnen writes:
In https://www.saxonica.com/saxon-js/documentation/index.html#!conformance/regex I find the statement:
However I get an error trying to use
;j as a flag. What seems to not raise an error is simply the suffix
j as in e.g.
analyze-string(., '\bcan\b', 'ij')/fn:match => count().
Is the documentation wrong or the implementation not doing what the documentation says?
Updated by Martin Honnen over 2 years ago
Thanks for the clarification.
However, that resolution deviates from the way Saxon Java or .NET handle Saxon specific flags (https://www.saxonica.com/html/documentation10/functions/fn/matches.html) as they have to be appended by after a semicolon.
So in term of interoperability it would make more sense to me if Saxon-JS also allowed to append the Saxon specific flag(s) after a semicolon.
Updated by Norm Tovey-Walsh over 2 years ago
However, I take your point about compatibility. Unfortunately, we now have a backwards incompatibility in both directions since requiring the semicolon would be incompatible with current Saxon-JS releases.
I've updated the code to optionally support the ";" syntax compatible with other Saxon products and updated the documentation to indicate that that is the preferred syntax. The current syntax, without the ";", will continue to work at least for 'j'.
Please register to edit this issue