mode = controller.getRuleManager().getUnnamedMode();
}
if (context.getCurrentIterator()==null) {
dynamicError("Cannot call xsl:apply-imports when there is no context item", "XTDE0565", context);
}
Item currentItem = context.getCurrentIterator().current();
if (!(currentItem instanceof NodeInfo)) {
dynamicError("Cannot call xsl:apply-imports when context item is not a node", "XTDE0565", context);
}
NodeInfo node = (NodeInfo)currentItem;
Rule rule = controller.getRuleManager().getTemplateRule(node, mode, min, max, context);