}
} else if (input instanceof Document) {
// iterate through all children
Document document = (Document) input;
for (int i = 0, size = document.nodeCount(); i < size; i++) {
Node node = document.node(i);
mod.fireRule(node);
}
} else if (input instanceof List) {
List list = (List) input;