-
-
Notifications
You must be signed in to change notification settings - Fork 189
[bugfix] XQuery 3.1 mandatory fixes from v2/xq4-core-functions (audit extract #3 subset) #6344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
00e55a8
0d96ad8
0aadff2
4ab5120
8dd6e9e
7a205f9
7966280
e7ccdf9
0047944
fe6a348
a729f1f
390016f
327393c
154ce4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,9 +125,23 @@ | |
| } | ||
| } | ||
|
|
||
| private void analyzeString(final MemTreeBuilder builder, final String input, String pattern, final String flags) throws XPathException { | ||
| private void analyzeString(final MemTreeBuilder builder, final String input, final String pattern, final String flags) throws XPathException { | ||
| final Configuration config = context.getBroker().getBrokerPool().getSaxonConfiguration(); | ||
|
|
||
| // XPath 4.0 lookaround syntax is not yet implemented in eXist's XQuery 3.1 runtime. | ||
| // When XQuery 4.0 lands (v2/xq4-core-functions), replace this guard with the | ||
| // translateXPath4Lookaround() dispatch path. | ||
| if (org.exist.xquery.regex.RegexUtil.hasXPath4Lookaround(pattern)) { | ||
|
Check notice on line 134 in exist-core/src/main/java/org/exist/xquery/functions/fn/FunAnalyzeString.java
|
||
| throw new XPathException(this, ErrorCodes.XPST0017, | ||
| "XPath 4.0 lookaround syntax in regex patterns (e.g. (*positive_lookahead:...)) " | ||
| + "is not yet implemented in this XQuery 3.1 build. Rewrite the regex without lookaround."); | ||
| } | ||
|
|
||
| // Pre-validate: reject constructs not valid in XPath 3.1 regex | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address Codacy issue: Unnecessary use of fully qualified name 'org.exist.xquery.regex.RegexUtil.validateXPathRegex' due to existing static import 'org.exist.xquery.regex.RegexUtil.*' |
||
| if (!org.exist.xquery.regex.RegexUtil.hasLiteral(flags)) { | ||
|
Check notice on line 141 in exist-core/src/main/java/org/exist/xquery/functions/fn/FunAnalyzeString.java
|
||
| org.exist.xquery.regex.RegexUtil.validateXPathRegex(this, pattern, false); | ||
|
Check notice on line 142 in exist-core/src/main/java/org/exist/xquery/functions/fn/FunAnalyzeString.java
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address Codacy issue: Unnecessary use of fully qualified name 'org.exist.xquery.regex.RegexUtil.validateXPathRegex' due to existing static import 'org.exist.xquery.regex.RegexUtil.*' |
||
| } | ||
|
|
||
| final List<String> warnings = new ArrayList<>(1); | ||
|
|
||
| try { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address Codacy issue: Unnecessary use of fully qualified name 'org.exist.xquery.regex.RegexUtil.validateXPathRegex' due to existing static import 'org.exist.xquery.regex.RegexUtil.*'