Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 90068 invoked by uid 500); 10 Jun 2002 16:35:03 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 90057 invoked from network); 10 Jun 2002 16:35:03 -0000 From: "Vadim Gritsenko" To: Subject: RE: Getting XML from request Date: Mon, 10 Jun 2002 12:34:52 -0400 Message-ID: <006501c2109c$bf4aad00$0a00a8c0@vgritsenkopc> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <52E3D1B72806D411B15C00508B121ADD0191F0DF@uskc01> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N There was an error in XSP helper class. Please get latest version of XSPObjectHelper.java from the CVS or update to latest CVS version. Vadim -----Original Message----- From: Mike Ash [mailto:mash@euronetworldwide.com]=20 Sent: Monday, June 10, 2002 11:53 AM To: 'cocoon-users@xml.apache.org' Subject: RE: Getting XML from request The XMLizable object I am using is from=20 org.apache.cocoon.components.source.URLSource=20 Which gets an xml file from a url.=A0 The file is a regular xml file = with a couple of nodes in it.=20 This class extends from=20 org.apache.cocoon.components.source.AbstractStreamSource=20 which is where the actual toSax() code is.=20 =A0=A0=A0 public void toSAX(ContentHandler handler) throws SAXException, ProcessingException {=20 =A0=A0=A0=A0=A0=A0=A0 Parser parser =3D null;=20 =A0=A0=A0=A0=A0=A0=A0 try {=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 parser =3D = (Parser)this.manager.lookup(Parser.ROLE);=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 parser.parse( this.getInputSource(), = handler);=20 =A0=A0=A0=A0=A0=A0=A0 } catch (SAXException e) {=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 // Preserve original exception=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw e;=20 =A0=A0=A0=A0=A0=A0=A0 } catch (Exception e){=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new = ProcessingException("Exception during processing of "=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + this.getSystemId(), = e);=20 =A0=A0=A0=A0=A0=A0=A0 } finally {=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (parser !=3D null) = this.manager.release(parser);=20 =A0=A0=A0=A0=A0=A0=A0 }=20 =A0=A0=A0 }=20 So I haven't found where/how the classname@memory-address is getting added to the xml.=20 Thanks for continuing to work with me on this, I really need the help.=20 -----Original Message-----=20 From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]=20 Sent: Monday, June 10, 2002 10:37 AM=20 To: cocoon-users@xml.apache.org=20 Subject: RE: Getting XML from request=20 Now you can go to XSPObjectHelper.xspExpr and see that if object is=20 XMLizable it does not print anything like classname@memory-address.=20 Can it come from your XMLizable object? Test it.=20 Vadim=20 -----Original Message-----=20 From: Mike Ash [mailto:mash@euronetworldwide.com]=20 Sent: Monday, June 10, 2002 11:16 AM=20 To: 'cocoon-users@xml.apache.org'=20 Subject: RE: Getting XML from request=20 I did and here is the line in java=20 =A0=A0 XSPObjectHelper.xspExpr(contentHandler,=20 request.getAttribute("xmlData"));=20 the XSPObjectHelper.xspExpr is suppossed to work with the XMLizable=20 object to get the xml.=A0 So is this saying that the URLSource object I=20 put in there is not doing the toSax() method correctly?=20 -----Original Message-----=20 From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]=20 Sent: Monday, June 10, 2002 9:44 AM=20 To: cocoon-users@xml.apache.org=20 Subject: RE: Getting XML from request=20 Check Java code generated from the XSP, in tomcat/work directory.=20 Vadim=20 -----Original Message-----=20 From: Mike Ash [mailto:mash@euronetworldwide.com]=20 Sent: Monday, June 10, 2002 8:26 AM=20 To: 'cocoon-users@xml.apache.org'=20 Subject: RE: Getting XML from request=20 Well I finally got an XMLizable object (URLSource) put into the request, however when I try to get it like this=20 =20 it returns the xml but also=20 my.class.name@memoryaddress=20 the above line make the xml it returns invalid.=20 Anyone know how to turn off the extra line?=A0 It looks to me like it is = calling the toString() method on my object.=20 -----Original Message-----=20 From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]=20 Sent: Wednesday, June 05, 2002 12:09 PM=20 To: cocoon-users@xml.apache.org=20 Subject: RE: Getting XML from request=20 Your object must be XMLizable (best), or DOM Node, but not String.=20 Other (not effective) way is to use util logicsheet to parse your String into XML. Answers about it are in the archives, with periodicity one=20 week or so.=20 Vadim=20 -----Original Message-----=20 From: Mike Ash [mailto:mash@euronetworldwide.com]=20 Sent: Wednesday, June 05, 2002 12:25 PM=20 To: 'cocoon-users@xml.apache.org'=20 Subject: RE: Getting XML from request=20 Sorry about not using plain text.=20 What I would like to end up with is nodes from the xsp page that contain the nodes from the object i put in the request.=20 =20 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 ....=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =20 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=20 What I am getting now is=20 =20 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = <mynode>=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 <mychildnode>=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 ....=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 </mychildnode>=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = </mynode>=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =20 =20 -----Original Message-----=20 From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]=20 Sent: Wednesday, June 05, 2002 11:10 AM=20 To: cocoon-users@xml.apache.org=20 Subject: RE: Getting XML from request=20 > I need that object back as xml in an xsp page, when I try this=20 > xsp:request:get-attribute name=3D"xmlData" as=3D"xml"=20 Correct syntax is:=20 =20 Result will be (IIRC):=20 value of=20 attribute=20 For:=20 =20 Result will be:=20 value of attribute=20 For:=20 Object o =3D ;=20 Result will be assigned to object 'o'.=20 > The question is then how do I get the data into the xsp as=20 > real xml nodes that I can use in a transformation step with xsl?=20 What do you mean?=20 PS PLEASE SEND PLAIN TEXT EMAILS=20 Vadim=20 -----Original Message-----=20 From: Mike Ash [mailto:mash@euronetworldwide.com]=20 Sent: Wednesday, June 05, 2002 11:25 AM=20 To: 'cocoon-users@xml.apache.org'=20 Subject: Getting XML from request=20 I am storing xml data in the request object by using=20 request.setAttribute("xmlData", someObject);=20 I need that object back as xml in an xsp page, when I try this=20 xsp:request:get-attribute name=3D"xmlData" as=3D"xml"=20 it returns the "xml" as a node value instead of individual nodes.=20 The question is then how do I get the data into the xsp as real xml=20 nodes that I can use in a transformation step with xsl?=20 =20 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: