Long time I had time to look at this, but I still have the problem. My problem is not getting the parameter to the Java method, but the fact that the XML returned from my method (msg) is escaped/encoded so that "<", ">" and so on is escaped to something quite useless.
I have attached my original post! Please help me :) -----Oprindelig meddelelse----- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sendt: 12. oktober 2001 04:41 Til: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Emne: Re: SV: Newbie XSP question - why dosn't this work? Hi Søren, On Fri, 12 Oct 2001, Søren Neigaard wrote: > <xsp:logic> > String msg = ContactBO.getContacts( > "<xsl:value-of select="pim:nummer"/>" <!-- osv, hvis der er >andre > parametre --> > ); > System.out.println("\n---> XML returned from BO:\n"); > System.out.println(msg); > System.out.println("\n---\n"); > </xsp:logic> Are you sure you want to what you are doing with the "-s? I am a complete newbie on this, but it seems to me that the Java part of things would get into problems with the 4 "-s up there... you'd have to do some escaping of them, ie. String msg = ContactBO.getContacts( "<xsl:value-of select=\"pim:nummer\"/>" ); Hope that works... Sincerely, Jan -- Mr. Jan-Aage Bruvoll IT Project Manager 20 Min Holding, Thurgauerstrasse 40, CH-8050 Zurich Zurich office: +41 1 307 4293, fax: +41 1 307 4281 Office/fax: +44 2072408283 Mobile: +44 7740291600 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
I have a XSP, a XSL and a logicsheet. Everything works fine, but one thing. My logicsheet returns XML, but it encodes the "<" and the ">". Why and what can I do to prevent this? Here is my logicsheet: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://apache.org/xsp" xmlns:pim="http://www.mobilethink.dk/pim"> <xsl:output encoding="ISO-8859-1" indent="yes" method="xml"/> <xsl:template match="xsp:page"> <xsp:page> <xsl:apply-templates select="@*"/> <xsp:structure> <xsp:include>java.util.*</xsp:include> <xsp:include>dk.mobilethink.test.businessobjects.*</xsp:include> </xsp:structure> <xsl:apply-templates/> </xsp:page> </xsl:template> <xsl:template match="pim:kontaktpersoner"> <xsp:logic> String msg = ContactBO.getContacts( "<xsl:value-of select="pim:nummer"/>" ); System.out.println(msg); </xsp:logic> <xsp:expr>msg</xsp:expr> </xsl:template> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>