templates.add(template);
} else {
namedTemplates.put(template.getName(), template);//UNDERSTAND: check doubles?
}
} else if (expr instanceof AttributeSet) {
AttributeSet attributeSet = (AttributeSet) expr;
if (attributeSets.containsKey(attributeSet.getName()))
attributeSets.get(attributeSet.getName()).add(attributeSet);
else {
List<AttributeSet> list = new ArrayList<AttributeSet>();
list.add(attributeSet);
attributeSets.put(attributeSet.getName(), list);
}
} else if (expr instanceof org.exist.xslt.expression.Variable) {
org.exist.xslt.expression.Variable variable = (org.exist.xslt.expression.Variable) expr;
variables.add(variable);