private Catch readCatch(Step parent, XdmNode node) { checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); Catch step = new Catch(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); Input input = new Input(runtime, step.getNode()); input.setPort("error"); input.addBinding(new ErrorBinding(runtime, step.getNode())); input.setPrimary(false); input.setSequence(true); step.addInput(input); if (rest == null) { throw XProcException.staticError(15, node, "A p:catch must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
private Catch readCatch(Step parent, XdmNode node) { checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); Catch step = new Catch(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); Input input = new Input(runtime, step.getNode()); input.setPort("error"); input.addBinding(new ErrorBinding(runtime, step.getNode())); input.setPrimary(false); input.setSequence(true); step.addInput(input); if (rest == null) { throw XProcException.staticError(15, node, "A p:catch must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }