Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 26855 invoked from network); 13 Feb 2001 22:08:08 -0000 Received: from bssvanmail.burnt-sand.com (HELO bssvanmail.burntsand.com) (192.139.235.251) by h31.sny.collab.net with SMTP; 13 Feb 2001 22:08:08 -0000 Received: by bssvanmail with Internet Mail Service (5.5.2650.21) id <15JC6Q54>; Tue, 13 Feb 2001 14:10:27 -0800 Message-ID: <2879A8B3053BD4118E22005004A426D0018E7844@bssvanmail> From: AKhan@burntsand.com To: cocoon-users@xml.apache.org Subject: RE: VoiceXML Application using Cocoon Date: Tue, 13 Feb 2001 14:10:26 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Donald, It works now - I had to include tag. Another problem was that I was passing the wrong document type to cloneNode. You need to pass the "document" object which is available to the xsp page and not your XML document. The program is working fine now - I'm able to translate the xml generated into a simpe HTML page by using an appropriate transform. Converting to VoiceXML is now a simple extension. Thanks for you help. -----Original Message----- From: Ayub Khan Sent: Tuesday, February 13, 2001 1:00 PM To: cocoon-users@xml.apache.org Subject: RE: VoiceXML Application using Cocoon Donald, Thanks for your suggestion. I tried out your idea of : xspCurrentNode.appendChild(XSPUtil.cloneNode(yourRootElement,document)); However, I'm getting an error message. Basically, the code does not invoke the XSLT processor - only the XSP processor is invoked. Will doing this simply show the XML that is generated when the XSP page is invoked. Here's my code and following it is the error message. The logic within the tags (except for the Cocoon specific part )works perfectly when tested alone as a standalone Java program. Any help on this will be greatly appreciated. Thanks Ayub =======================C O D E=========================== java.net.URL oracle.xml.parser.v2.XMLDocument URL getXMLFeed = new URL("http://p.moreover.com/cgi-local/page?c=Biotech%20news&o=xml"); InputStream in = getXMLFeed.openStream(); DOMParser dp = new DOMParser(); dp.setValidationMode(false); dp.setPreserveWhitespace(true); dp.parse(in); XMLDocument xd = (XMLDocument)dp.getDocument(); Element rootEl = xd.getDocumentElement(); String rootStr = rootEl.getTagName(); NodeList nl = xd.getElementsByTagName(rootStr); Node ni = nl.item(0); xspCurrentNode.appendChild(XSPUtil.cloneNode(ni,xd)); =======================C O D E=========================== =======================E R R O R=========================== Error found handling the request. org.xml.sax.SAXParseException: The reference to entity "o" must end with the ';' delimiter. at org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105) at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume ntScanner.java:634) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM LDocumentScanner.java:1308) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. java:380) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900) at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85) at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83) at org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.jav a:78) at org.apache.cocoon.Engine.handle(Engine.java:359) at org.apache.cocoon.Cocoon.service(Cocoon.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :208) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:1127) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) =======================E R R O R=========================== Thanks -----Original Message----- From: Donald Ball [mailto:balld@webslingerZ.com] Sent: Tuesday, February 13, 2001 11:11 AM To: cocoon-users@xml.apache.org Subject: RE: VoiceXML Application using Cocoon On Tue, 13 Feb 2001 AKhan@burntsand.com wrote: > My problem is that the XML info (which I've aquired from > an XML News Feed ) is present in the form of > and in-memory XML Document and not as the XML contents of the > XSP file. > > So do I have to : > > 1) Traverse the in-memory XML Document and programmatically > build up the XML contents of the XSP file er, no, try yourRootElement failing that (can't remember what the constraints are on xsp:expr), you could do this: xspCurrentNode.appendChild(XSPUtil.cloneNode(yourRootElement,document)); or you could write your own producer, but i think will prove to be less flexible than an xsp solution. - donald --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: