Browse Source

Fix for ant namespace support for nested elements

Obtained from: Dominique Devienne


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275856 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
a1b18ea9c3
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/main/org/apache/tools/ant/IntrospectionHelper.java

+ 12
- 0
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -610,6 +610,12 @@ public final class IntrospectionHelper implements BuildListener {
String uri = ProjectHelper.extractUriFromComponentName(elementName);
String name = ProjectHelper.extractNameFromComponentName(elementName);

if (uri.equals(ProjectHelper.ANT_CORE_URI)) {
uri = "";
}
if (parentUri.equals(ProjectHelper.ANT_CORE_URI)) {
parentUri = "";
}
NestedCreator nc = null;
if (uri.equals(parentUri)) { // || uri.equals("")) {
nc = (NestedCreator) nestedCreators.get(
@@ -741,7 +747,13 @@ public final class IntrospectionHelper implements BuildListener {
* @return true if the given nested element is supported
*/
public boolean supportsNestedElement(String parentUri, String elementName) {
if (parentUri.equals(ProjectHelper.ANT_CORE_URI)) {
parentUri = "";
}
String uri = ProjectHelper.extractUriFromComponentName(elementName);
if (uri.equals(ProjectHelper.ANT_CORE_URI)) {
uri = "";
}
String name = ProjectHelper.extractNameFromComponentName(elementName);

return (


Loading…
Cancel
Save