// that is, highest precedence first.
for (int i = 0; i < numberOfAliases; i++) {
Declaration decl = namespaceAliasList.get(i);
XSLNamespaceAlias xna = (XSLNamespaceAlias)decl.getSourceElement();
String scode = xna.getStylesheetURI();
NamespaceBinding ncode = xna.getResultNamespaceBinding();
int prec = decl.getPrecedence();
// check that there isn't a conflict with another xsl:namespace-alias
// at the same precedence
if (currentPrecedence != prec) {
currentPrecedence = prec;
aliasesAtThisPrecedence.clear();
//precedenceBoundary = i;
}
if (aliasesAtThisPrecedence.contains(scode)) {
if (!namespaceAliasMap.get(scode).equals(ncode.getURI())) {
xna.compileError("More than one alias is defined for the same namespace", "XTSE0810");
}
}
if (namespaceAliasMap.get(scode) == null) {
namespaceAliasMap.put(scode, ncode);
aliasResultUriSet.add(ncode.getURI());
}
aliasesAtThisPrecedence.add(scode);
}
namespaceAliasList = null; // throw it in the garbage
}