Re: [PR] IVY-1658: merge `ivy-module` namespaces [an t-ivy]
eric-milles (via GitHub) <[email protected]> Sun, 15 Feb 2026 16:13:15 -0000
| Newsgroups | gmane.comp.jakarta.ant.devel |
|---|---|
| Message-ID | <PR_kwDOATT2Es6iE09a-574ed645-9fb5-445e-9270-6fa5caa390ae@gitbox.apache.org> |
eric-milles commented on code in PR #111:
URL: https://github.com/apache/ant-ivy/pull/111#discussion_r2809658789
##########
src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java:
##########
@@ -409,13 +410,22 @@ public void startElement(String uri, String localName, String qName, Attributes
// copy
write("<" + qName);
- for (int i = 0; i < attributes.getLength(); i++) {
- write(" " + attributes.getQName(i) + "=\""
- + substitute(settings, attributes.getValue(i)) + "\"");
+ if (options.isMerge() && path.equals("ivy-module")) {
+ for (int i = 0, n = attributes.getLength(); i < n; i += 1) {
+ if (attributes.getQName(i).startsWith("xmlns:")) continue;
+ write(" " + attributes.getQName(i) + "=\"" + substitute(settings, attributes.getValue(i)) + "\"");
+ }
+ Map<String, String> namespaces = options.getMergedDescriptor().getExtraAttributesNamespaces();
+ for (Map.Entry<String, String> namespace : namespaces.entrySet()) {
+ write(" xmlns:" + namespace.getKey() + "=\"" + substitute(settings, namespace.getValue()) + "\"");
+ }
+ } else {
+ for (int i = 0, n = attributes.getLength(); i < n; i += 1) {
Review Comment:
Does that really change the functionality? These issues are very complex and we're not going to get far this way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]