The _javascript_ function is called from a pipeline match
 
<map:match pattern="test">
   <map:call function="main" />
   <map:serialize/>
</map:match>
 
The function looks something like this
 
function main() {
    var output = new Packages.java.io.ByteArrayOutputStream();
    cocoon.processPipelineTo('blah/matcher, {}, output);
 
    var doc = output.toString();
 
    // doc is now an xml string - this is all working fine
    // I want to do some error checking and a possible soap call at this point
 
    if (success)
        // the output (doc) would become the result, which would be using the function call like a generator, to be serialized   
    else   
        cocoon.sendPage('failure', {});
 
}
 
a) I hope I have made sense
b) Any ideas?
 
Joe
 

Reply via email to