This will work but not with the upcoming Flow Object Model. You won't have access to the environment any more. If you are interested in the FOM you find a reference here: http://wiki.cocoondev.org/Wiki.jsp?page=FOM (be aware that this is a working document and may change!!!)
So currently the easiest way is { ... var uri = "cocoon://blablabla"; var resolver = cocoon.componentManager.lookup( Packages.org.apache.cocoon.environment.SourceResolver.ROLE ); var srce = resolver.resolveURI( uri ); cocoon.componentManager.release( resolver ); var dom = Packages.org.apache.cocoon.components.source.SourceUtil.toDOM( srce ); ... } which will probably change with FOM to { ... var uri = "cocoon://blablabla"; var resolver = cocoon.getComponent( Packages.org.apache.cocoon.environment.SourceResolver.ROLE ); var srce = resolver.resolveURI( uri ); // release of the component (not defined yet var dom = Packages.org.apache.cocoon.components.source.SourceUtil.toDOM( srce ); ... } Hope this helps! Reinhard > -----Original Message----- > From: Frank Taffelt [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 9:34 AM > To: [EMAIL PROTECTED] > Subject: Re: reading xml from pipeline into a flow script > > > you can use this snippet: > > function getString(src) { > try { > var is = > cocoon.environment.resolveURI(src).getInputStream(); > return > Packages.org.apache.cocoon.components.language.markup.xsp.XSPU > til.getContent > s(is); > } > catch(ex) { > print("ex:" + ex); > } > return null; > > > } > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]