Hi, > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Dear Johannes Wechsler wrote: > > Check the return type the the start method. You declare it void > and then return a String. That looks suspicious.
You cannot send a string into the transformation and expect it to be a nodeset. Here is some code that creates a nodeset: Node root = null; try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder docbuilder = factory.newDocumentBuilder(); org.w3c.dom.Document outNode = docbuilder.newDocument(); root = docbuilder.parse(new InputSource(new StringReader(restrictions.toString()))); } catch (Exception e) { // whatever } then pass 'root' in with setParameter. best, -Rob > > Alan Hodgkinson. > > > Hi, > > I use a webservice to access the Xindice-database. The URL I access is: > > http://localhost:8004/glue/DBServer/xPathQuery?collectionName=johannes2&quer > > yString=//projects > > > > The method "xPathQuery" returns the (nearly) the following string: > > <projects> > > <projectName>Test 1</projectName> > > <description>Erstes Projekt</description> > > <projectLeader>Die erste Person</projectLeader> > > </projects> > > > > The code of the xsp which calls the webservice is listed below: > > > > <xsp:logic> > > String key; > > > > public void start() > > { > > BufferedReader in = new BufferedReader( new InputStreamReader ( > > webserviceURL.openStream() ) ); > > key = ""; > > while ( ( s = in.readLine() ) != null ) > > { key += s; } > > in.close(); > > > > return key; > > } > > </xsp:logic> > > > > <projects> > > <xsp:expr> start() </xsp:expr> > > </projects> > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>