Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Jan 16, 2026

gitflow-feature-stash: namespacaes

Copilot AI review requested due to automatic review settings January 16, 2026 20:32
@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Copyright Validation Results
Total: 6 | Passed: 6 | Failed: 0 | Skipped: 0 | at: 2026-01-16 21:24:10 UTC | commit: 0ab46c8

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/ContentExclusionUtil.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteEvalFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteOpticFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/SimpleNamespaceContext.java
  • marklogic-client-api/src/test/java/com/marklogic/client/datamovement/filter/ApplyExclusionsToIncrementalWriteTest.java

✅ All files have valid copyright headers!

Copy link

Copilot AI left a 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 xmlNamespaces parameter to support namespace prefixes in XPath exclusion expressions
  • Created SimpleNamespaceContext class to implement javax.xml.namespace.NamespaceContext
  • Updated signature of ContentExclusionUtil.applyXmlExclusions to 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));
}

Copy link

Copilot AI Jan 16, 2026

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.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +124
* @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".
Copy link

Copilot AI Jan 16, 2026

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.

Copilot uses AI. Check for mistakes.
BillFarber
BillFarber previously approved these changes Jan 16, 2026
gitflow-feature-stash: namespacaes
@rjrudin rjrudin merged commit cc59358 into develop Jan 16, 2026
7 checks passed
@rjrudin rjrudin deleted the feature/namespacaes branch January 16, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants