Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.xmlcalabash.runtime;
 
 
Created by IntelliJ IDEA. User: ndw Date: Oct 8, 2008 Time: 5:25:42 AM To change this template use File | Settings | File Templates.
public class XPipelineCall extends XAtomicStep {
    private DeclareStep decl = null;
    public XPipelineCall(XProcRuntime runtimeStep stepXCompoundStep parent) {
        super(runtimestepparent);
        this. = parent;
    }
    public void setDeclaration(DeclareStep decl) {
        this. = decl;
    }
    public XCompoundStep getParent() {
        return ;
    }
    public void run() throws SaxonApiException {
        fine(null"Running " + .getType());
        .setup();
        if (.getErrorCode() != null) {
            throw new XProcException(.getErrorCode(), .getErrorMessage());
        }
        XRootStep root = new XRootStep();
        XPipeline newstep = new XPipeline(root);
        newstep.instantiate();
        // Calculate all the options
        HashSet<QNamepipeOpts = new HashSet<QName> ();
        for (QName name : newstep.step.getOptions()) {
            pipeOpts.add(name);
        }
        for (QName name : .getOptions()) {
            Option option = .getOption(name);
            RuntimeValue value = computeValue(option);
            setOption(namevalue);
            if (pipeOpts.contains(name)) {
                newstep.passOption(namevalue);
            }
            .put(namevalue);
        }
        for (QName name : .getParameters()) {
            Parameter param = .getParameter(name);
            RuntimeValue value = computeValue(param);
            newstep.setParameter(namevalue);
        }
        for (String port : .keySet()) {
            if (!port.startsWith("|")) {
                newstep.inputs.put(port.get(port));
            }
        }
        for (String port : .keySet()) {
            if (!port.endsWith("|")) {
                newstep.outputs.put(port.get(port));
            }
        }
        newstep.run();
    }
New to GrepCode? Check out our FAQ X