cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Watson" <cwat...@taraserv.demon.co.uk>
Subject RE: How best to incorporate xml from a string into XSP
Date Tue, 11 Dec 2001 10:34:53 GMT
Marvellous. I hoped it would be that easy!

-----Original Message-----
From: David Rosenstrauch [mailto:darose@dti.net]
Sent: 11 December 2001 02:52
To: cocoon-users@xml.apache.org
Subject: Re: How best to incorporate xml from a string into XSP


Someone else had this same problem recently.

Use <util:include-expr>.  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).

1) 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 call you need to make this work:
<util:include-expr><util:expr><xsp:expr>myString</xsp:expr></util:expr></uti
l:include-expr>

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


DR


At 11:01 PM 12/10/01 +0000, you wrote:
>Could someone help
>
>I have a method on an object that produces XML as a string.
>I wish to incorporate it into an XSP page.
>
><xsp:expr>myString</xsp:expr>
>doesn't work, since it kindly changes < into &lt; etc.
>
>I have tried various approaches, each with various unwanted side effects.
>
>Could someone tell me what is the BEST way to achieve this?
>
>i.e.
>
>Parse it?
>DOM vs SAX?
>use this.contentHandler?
>use <xsp:expr>myStringAsANode</xsp:expr>?
>
>some other Cocoon technique/ generator/transformer etc
>
>Christopher
>
>
>
>---------------------------------------------------------------------
>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>


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