cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Neigaard <s.neiga...@mobilethink.dk>
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
Søren

-----Oprindelig meddelelse-----
Fra: David Rosenstrauch [mailto:darose@dti.net]
Sendt: 6. november 2001 08:24
Til: cocoon-users@xml.apache.org
Emne: Fwd: Re: Newbie XSP question - why dosn't this work?


Søren,

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.

Note:
1) You must include the namespace
xmlns:util="http://apache.org/xsp/util/2.0" in your XSP or the
<util:include-expr> won't get called properly.

2) the super-nested call you need to make this work:
<util:include-expr><util:expr><xsp:expr>s</xsp:expr></util:expr></util:inclu
de-expr>

<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.


DR


>From: "Frank Taffelt" <frank.taffelt@interface-business.de>
>To: <cocoon-users@xml.apache.org>
>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
>
>
>hth,
>frank
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message