void (Element element, String s, LinkedHashMap<String, HistoryElement> hst) { final Element historyElement = element.getChild(s); if (historyElement != null) { final List<Element> entries = historyElement.getChildren(HISTORY_ELEMENT); for (final Element entry : entries) { final String expression = entry.getAttributeValue(EXPRESSION); if (expression != null) { List<Element> children = entry.getChildren(VARIABLE); final Collection<Variable> variables = new ArrayList<>(children.size()); for (Element e : children) { variables.add(new Variable(e.getAttributeValue(NAME), e.getAttributeValue(EXPRESSION))); } children = entry.getChildren(NAMESPACE); final Collection<Namespace> namespaces = new ArrayList<>(children.size()); for (Element namespaceElement : children) { namespaces.add(new Namespace(namespaceElement.getAttributeValue(PREFIX), namespaceElement.getAttributeValue(URI))); } hst.put(expression, new HistoryElement(expression, variables, namespaces)); } } } }