private ForEach readForEach(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_for_each.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); ForEach step = new ForEach(runtime, node, stepName); checkExtensionAttributes(node, step); // FIXME: Do I really need parentDecl and parent? step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:for-each must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
private ForEach readForEach(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_for_each.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); ForEach step = new ForEach(runtime, node, stepName); checkExtensionAttributes(node, step); // FIXME: Do I really need parentDecl and parent? step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:for-each must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }