cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <>
Subject RE: Running Schematron validation from flow
Date Mon, 29 Dec 2003 19:32:27 GMT
Vadim Gritsenko <> writes:

> Hunsberger, Peter wrote:
> >Is
> >there any existing in-memory writable source available for 
> reuse?  Any 
> >hints on how to do this?
> >
> Try:
Thanks, that seems to be half the picture, but I think I'm still missing
something: can I call a Cocoon pipeline using xmodule?  I'm getting the

	"Cannot set XMLSerializer outputstream"

Which would seem to indicate a problem with the output stream, but since
I've tried using the request-attr stream from the samples and got the
same error I assume it's something to do with the input side of the

The sitemap fragment for the input data is straightforward enough:

            <map:match pattern="*/_validate/**">
                <map:generate src="cocoon:/{/1}/requestdata"/>
                <map:transform src="stylesheets/resolve_request.xsl"/>
                <map:transform type="CTcheck"/>
                <map:serialize type="xml"/>

The flowscript looks like:

    var sourceURI = "xmodule:cocoon:run/_validate/"+collection;
    var destinationURI = "xmodule:request-attr:validate";

    var resolver = null;
    var source = null;
    var destination = null;
    try {
        resolver = cocoon.getComponent( );
        source = resolver.resolveURI( sourceURI );
        destination = resolver.resolveURI( destinationURI );
source, destination );
    } finally {
        if ( source != null )
            resolver.release( source );
        if (destination != null)
            resolver.release( destination );
        cocoon.releaseComponent( resolver );

Where "collection" is a variable previously set that tells me what
collection of metadata I'm dealing with.  

Is this just a case of using the wrong protocol (If so what would it
be)?  Do I perhaps need a version of Cocoon from CVS and not the 2.1.3

One interesting thing to note is that the error is reported as occurring
at the "cocoon.releaseComponent( resolver);" line of the flow script...

View raw message