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; }
@Override protected void augmentIO() { // Output bindings on a compound step are really the input half of an input/output binding; // create the other half for (Output output : outputs) { Input input = getInput("|" + output.getPort()); if (input == null) { input = new Input(runtime, output.getNode()); input.setPort("|" + output.getPort()); input.setSequence(true); // the other half will check input.setPrimary(output.getPrimary()); addInput(input); } } // The only input on catch is errors and it's special } }
if (p_catch.outputs().size() != outputs.size()) { valid = false; runtime.error(null, p_group.getNode(), "The p:group and p:catch in a p:try must declare the same outputs", XProcConstants.staticError(9)); for (Output output : p_catch.outputs()) { if (outputs.containsKey(output.getPort())) { Output s1output = outputs.get(output.getPort());
@Override protected void augmentIO() { // Output bindings on a compound step are really the input half of an input/output binding; // create the other half for (Output output : outputs) { Input input = getInput("|" + output.getPort()); if (input == null) { input = new Input(runtime, output.getNode()); input.setPort("|" + output.getPort()); input.setSequence(true); // the other half will check input.setPrimary(output.getPrimary()); addInput(input); } } // The only input on catch is errors and it's special } }
if (p_catch.outputs().size() != outputs.size()) { valid = false; runtime.error(null, p_group.getNode(), "The p:group and p:catch in a p:try must declare the same outputs", XProcConstants.staticError(9)); for (Output output : p_catch.outputs()) { if (outputs.containsKey(output.getPort())) { Output s1output = outputs.get(output.getPort());
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; }