}
}
// update ingoing edges
for (Node node : xg.getNodes()) {
if (node instanceof SingleContentNode) {
SingleContentNode sc = (SingleContentNode)node;
Node content = xg.getNode(sc.getContent());
if (content instanceof ElementNode || content instanceof AttributeNode) {
sc.setContent(pred.get(content).getIndex());
}
}
else if (node instanceof MultiContentNode) {
MultiContentNode mc = (MultiContentNode)node;
LinkedList<Integer> newcontent = new LinkedList<Integer>();