private Viewport readViewport(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_viewport.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name", "match" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); RuntimeValue match = new RuntimeValue(node.getAttributeValue(new QName("match")), node); Viewport step = new Viewport(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; step.setMatch(match); Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:viewport must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
private Viewport readViewport(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_viewport.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name", "match" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); RuntimeValue match = new RuntimeValue(node.getAttributeValue(new QName("match")), node); Viewport step = new Viewport(runtime, node, stepName); checkExtensionAttributes(node, step); step.setParentDecl((DeclareStep) parent); step.parent = parent; step.setMatch(match); Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:viewport must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }