cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <mailingli...@c-ware.de>
Subject Enhanced execute pipeline to Dom from Flowscript
Date Wed, 18 Apr 2007 06:27:30 GMT
Hi,

I am currently using the folowing pipeline to let cocoon load a 
pipelines result to a dom-object:
function loadDocument(uri) {
    // AE: cocoon://
    var parser = null;
    var source = null;
    var resolver = null;
    try {
        parser = cocoon.getComponent(DOMParser.ROLE);
        resolver = cocoon.getComponent(SourceResolver.ROLE);
        source = resolver.resolveURI(uri);
        if 
(source.getClass().getName().equals("org.apache.cocoon.components.source.impl.SitemapSource")

== false) {
            print("Warning: loadDocument received an incorrect URI:");
            print("    " + source.getClass().getName());           
        }
        var is = new InputSource(source.getInputStream());
        is.setSystemId(source.getURI());
        return parser.parseDocument(is);
    } finally {
        if (source != null)
            resolver.release(source);
        cocoon.releaseComponent(parser);
        cocoon.releaseComponent(resolver);
    }
}

I would now like to extend the function in a way that I can add 
flow-attributes.
At the moment I call the function lets say this way:
var doc = loadDocument("cocoon:/testpipeline");
I would now like to ba able to do this:
var doc = loadDocument("cocoon:/testpipeline", {"param1": param1Value});

Any ideas and hints to how I can accieve this?

Regards,
     Christofer Dutz


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message