Skip to content

Commit

Permalink
Fix wrong namespaces when using XML imports
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Aug 31, 2024
1 parent 184180d commit 62f0b62
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ else if (passNumber == 2) {
String addrStr = element.getAttribute("ADDRESS");
String namespace = element.getAttribute("NAMESPACE");
if (namespace != null && namespace.endsWith("::")) {
namespace = namespace.substring(namespace.length() - 2);
namespace = namespace.substring(0, namespace.length() - 2);
}
String primary = element.getAttribute("PRIMARY");
String sourceTypeString = element.getAttribute("SOURCE_TYPE");
Expand Down Expand Up @@ -233,13 +233,8 @@ else if (localNamespace != null &&
scope = localNamespace;
}
else if (namespace != null && namespace.length() != 0) {
if (program.getGlobalNamespace().equals(localNamespace)) {
scope = NamespaceUtils.createNamespaceHierarchy(namespace,
program.getGlobalNamespace(), program, sourceType);
}
else {
name = namespace + name;
}
scope = NamespaceUtils.createNamespaceHierarchy(namespace,
program.getGlobalNamespace(), program, sourceType);
}

Symbol s = symbolTable.getPrimarySymbol(addr);
Expand Down

0 comments on commit 62f0b62

Please # to comment.