cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Neigaard <>
Subject SV: Re: Newbie XSP question - why dosn't this work?
Date Fri, 09 Nov 2001 23:25:05 GMT
I... What... But... Ok tjeck this one out (this will probably not make any
sence to people new to this thread):

I have my "old" Java object that returns XML to my logicsheet. This object
can return a lot of different XML, depending on what parameters it get (my
super duper framework - joke). Now I have two different XML outputs on two
different URL's. Each work just fine, C2 processes my XML just fine. But if
I hit XML1-URL C2 processes the XML, and if I then hit XML2-URL reight
thereafter it prints out the XML (my old problem returns), and I have to
restart C2 to get XML2-URL to work correctly. And vise versa if I start by
hitting XML2-URL (after a restart) it works but then XML1-URL fails (yes the
old "XML-printout" problem again again).

Are you confused, I know I am. I dont understand a thing at all???? Any
input apriciated.

Best regards

-----Oprindelig meddelelse-----
Fra: David Rosenstrauch []
Sendt: 6. november 2001 08:24
Emne: Fwd: Re: Newbie XSP question - why dosn't this work?


OK.  Problem solved.

Frank was right.  <util:include-expr> is the way to go.  It will parse the
text that you pass in to it, and generate SAX calls from it (as opposed to
writing the text straight to the output - after escaping all the control
chars - like it's doing now).

I've attached:
* test.xsp, which is the solution to your problem but using test data (you
should be able to easily adapt it to your needs), and
* test.xml, which is the output that proves this works.

1) You must include the namespace
xmlns:util="" in your XSP or the
<util:include-expr> won't get called properly.

2) the super-nested call you need to make this work:

<xsp:expr>s</xsp:expr> takes the value of String  s, which is then passed in
to <util:include-expr>.

This should solve your problem.  Email if not.


>From: "Frank Taffelt" <>
>To: <>
>Subject: Re: Newbie XSP question - why dosn't this work?
>Date: Tue, 6 Nov 2001 10:17:03 +0100
>sorry i sent you the right in the wrong syntax.
>the code to embed your String is:
><util:include-expr><util:expr>msg</util:expr> </util:include-expr>
>alternatively you can let your ContactBO return either an
>* org.w3c.dom.Node that represents your BO in a DOM
>* object that implements org.apache.cocoon.xml.XMLizable for generating
>SAX-Events according to your BO-Data
>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: <>

View raw message