cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@dti.net>
Subject Fwd: Re: Newbie XSP question - why dosn't this work?
Date Tue, 06 Nov 2001 16:23:48 GMT
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:include-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> 

Mime
View raw message