-
Notifications
You must be signed in to change notification settings - Fork 74
MLE-26427 Namespace support for exclusions #1885
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
Conversation
|
Copyright Validation Results ✅ Valid Files
✅ All files have valid copyright headers! |
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.
Pull request overview
This PR adds namespace support for XML exclusions in the incremental write filtering functionality. The change allows XPath expressions in XML exclusions to reference namespaced elements by providing a prefix-to-URI mapping.
Changes:
- Added
xmlNamespacesparameter to support namespace prefixes in XPath exclusion expressions - Created
SimpleNamespaceContextclass to implementjavax.xml.namespace.NamespaceContext - Updated signature of
ContentExclusionUtil.applyXmlExclusionsto accept namespace mappings
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ApplyExclusionsToIncrementalWriteTest.java | Added test case verifying XML exclusions work correctly with namespaced elements |
| SimpleNamespaceContext.java | New class implementing NamespaceContext for namespace-aware XPath evaluation |
| IncrementalWriteFilter.java | Added xmlNamespaces builder method and validation; updated constructor signatures |
| IncrementalWriteOpticFilter.java | Updated constructor to pass xmlNamespaces parameter through inheritance chain |
| IncrementalWriteEvalFilter.java | Updated constructor to pass xmlNamespaces parameter through inheritance chain |
| ContentExclusionUtil.java | Modified applyXmlExclusions methods to accept and use namespace mappings |
Comments suppressed due to low confidence (2)
marklogic-client-api/src/test/java/com/marklogic/client/datamovement/filter/ApplyExclusionsToIncrementalWriteTest.java:1
- Test data uses dates in 2026, which is in the future. Consider using dates relative to the current date or fixed past dates to avoid confusion.
/*
marklogic-client-api/src/test/java/com/marklogic/client/datamovement/filter/ApplyExclusionsToIncrementalWriteTest.java:1
- Test data uses dates in 2026, which is in the future. Consider using dates relative to the current date or fixed past dates to avoid confusion.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (namespaces != null && !namespaces.isEmpty()) { | ||
| xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces)); | ||
| } | ||
|
|
Copilot
AI
Jan 16, 2026
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.
Remove the trailing whitespace on this blank line to maintain consistent code formatting.
| * @param namespaces a map of namespace prefixes to URIs for use in XPath exclusion expressions. | ||
| * For example, Map.of("ns", "http://example.com/ns") allows XPath like "//ns:timestamp". |
Copilot
AI
Jan 16, 2026
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.
Add @return documentation to match the pattern of other builder methods, indicating that this method returns the Builder instance for method chaining.
...est/java/com/marklogic/client/datamovement/filter/ApplyExclusionsToIncrementalWriteTest.java
Show resolved
Hide resolved
gitflow-feature-stash: namespacaes
4163c2f to
0ab46c8
Compare
gitflow-feature-stash: namespacaes