> > For my flows I use a self-defined function which makes this for me:
> >
> > function callPipeline(src) {
> > xc = cocoon.componentManager.lookup( myXMLConsumer.ROLE );
> > resolver =
> cocoon.environment.getObjectModel().get("source-resolver");
> > srce = resolver.resolveURI(src);
> > resolver.toSAX( srce, xc );
> > return xc;
> > }
> >
> > The component myXMLConsumer has a method <code>public String
> > getDocument()</code> ... mabe there is a better/more elegant way, but it
> > works for me ;-)
>
> nonono, careful. You are calling a pipeline to have its data as an
> object model to play with. While this is fair, I don't like it at all
> and would not want it included in system.js. It looks like an hack from
> miles away (sorry, no offense, just stating my impressions honestly)
After having a second look at my sources I think I don't really need the
part generating the string. This would reduce it to following lines:
function callPipeline( src ) {
var xc = cocoon.componentManager.lookup( anyXMLConsumer.ROLE );
var resolver = cocoon.environment.getObjectModel().get(
"source-resolver" );
var srce = resolver.resolveURI( src );
resolver.toSAX( srce, xc );
}
Then the pipeline called with "src" makes everything on its own.
1. gather the necessary information from somewhere (input modules,
database, ...)
2. save the information (send a mail, write to cvs, write to disc, ...)
There remains one open question for me: How to I get 'feedback' whether the
called pipeline did its job well or not? And if not, how to I get
information about what happend (error message/status information)?
What do you think?
Reinhard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]