public void setBinding(String binding) { nsBindings = null; this.binding = binding; if (binding != null && expr != null) { throw XProcException.staticError(41); } }
public void setBinding(String binding) { nsBindings = null; this.binding = binding; if (binding != null && expr != null) { throw XProcException.staticError(41); } }
public void setXPath(String expr) { nsBindings = null; this.expr = expr; if (binding != null && expr != null) { throw XProcException.staticError(41); } }
public void setXPath(String expr) { nsBindings = null; this.expr = expr; if (binding != null && expr != null) { throw XProcException.staticError(41); } }
public DeclareStep getBuiltinDeclaration(QName name) { if (declaredSteps.containsKey(name)) { return declaredSteps.get(name); } else { throw XProcException.staticError(44, null, "Unexpected step name: " + name); } }
public DeclareStep getBuiltinDeclaration(QName name) { if (declaredSteps.containsKey(name)) { return declaredSteps.get(name); } else { throw XProcException.staticError(44, null, "Unexpected step name: " + name); } }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { if ("#xpath-context".equals(input.getPort())) { return; // It's ok for the xpath-context port to be specified in both places. } else { throw XProcException.staticError(11, "Input port name '" + input.getPort() + "' appears more than once."); } } } inputs.add(input); }
public void addVariable(Variable variable) { if (variablesSeen.contains(variable.getName()) || (getOption(variable.getName()) != null)) { throw XProcException.staticError(4, "Duplicate variable/option name: " + variable.getName()); } variablesSeen.add(variable.getName()); variables.add(variable); }
public void addVariable(Variable variable) { if (variablesSeen.contains(variable.getName()) || (getOption(variable.getName()) != null)) { throw XProcException.staticError(4, "Duplicate variable/option name: " + variable.getName()); } variablesSeen.add(variable.getName()); variables.add(variable); }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { if ("#xpath-context".equals(input.getPort())) { return; // It's ok for the xpath-context port to be specified in both places. } else { throw XProcException.staticError(11, "Input port name '" + input.getPort() + "' appears more than once."); } } } inputs.add(input); }
public void addOutput(Output output) { output.setStep(this); for (Output current : outputs) { if (current.getPort().equals(output.getPort())) { throw XProcException.staticError(11, output.getNode(), "Output port name '" + output.getPort() + "' appears more than once."); } } outputs.add(output); }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { throw XProcException.staticError(11, input.getNode(), "Input port name '" + input.getPort() + "' appears more than once."); } } inputs.add(input); }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { throw XProcException.staticError(11, input.getNode(), "Input port name '" + input.getPort() + "' appears more than once."); } } inputs.add(input); }
protected void checkDuplicateVars(HashSet<QName> vars) { for (Variable var : getVariables()) { if (vars.contains(var.getName())) { throw XProcException.staticError(4, getNode(), "Duplicate variable name: " + var.getName()); } else { vars.add(var.getName()); } } }
protected void checkDuplicateVars(HashSet<QName> vars) { for (Variable var : getVariables()) { if (vars.contains(var.getName())) { throw XProcException.staticError(4, getNode(), "Duplicate variable name: " + var.getName()); } else { vars.add(var.getName()); } } }
public void addOutput(Output output) { output.setStep(this); for (Output current : outputs) { if (current.getPort().equals(output.getPort())) { throw XProcException.staticError(11, output.getNode(), "Output port name '" + output.getPort() + "' appears more than once."); } } outputs.add(output); }
private Log readLog(XdmNode node) { checkAttributes(node, new String[] { "port", "href" }, false); String port = checkNCName(node.getAttributeValue(new QName("port"))); String href = node.getAttributeValue(new QName("href")); URI hrefURI = null; if (href != null) { hrefURI = node.getBaseURI().resolve(href); } Log log = new Log(runtime, node); log.setPort(port); log.setHref(hrefURI); checkExtensionAttributes(node, log); for (XdmNode snode : new AxisNodes(runtime, node, Axis.CHILD, AxisNodes.PIPELINE)) { throw XProcException.staticError(44, node, "p:log must be empty"); } checkExtensionAttributes(node, log); return log; }
private Group readGroup(Step parent, XdmNode node) { checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); Group step = new Group(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:group must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
private Group readGroup(Step parent, XdmNode node) { checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); Group step = new Group(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:group must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
private Try readTry(Step parent, XdmNode node) { checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); Try step = new Try(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:try must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }