Ah, just found another subject that deals with the
<xsp:expr>fName</xsp:expr>.  Look in your cocoon-users for subject for
"How best to incorporate xml from a string into XSP"

Christopher Watson posted the following on December 11:

Marvellous. I hoped it would be that easy!

-----Original Message-----
From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2001 02:52
To: [EMAIL PROTECTED]
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
>
>

----- Original Message -----
From: "Luca Morandini" <[EMAIL PROTECTED]>
To: "Cocoon-users" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 5:27 AM
Subject: RE: [c1] Using Markup Symbols from a Database Field?


> Derek,
>
> just try to put the "disable-output-escaping" into the XSL which
> takes care of transforming the <value> element into HTML.
>
>  Best regards,
>
>  ---------------------------------------------
>                 Luca Morandini
>                 GIS Consultant
>                [EMAIL PROTECTED]
>  http://utenti.tripod.it/lmorandini/index.html
>  ---------------------------------------------
>
> >
> > > -----Original Message-----
> > > From: Derek Hohls [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, November 26, 2001 11:04 AM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: RE: [c1] Using Markup Symbols from a Database Field?
> > >
> > >
> > > Luca
> > >
> > > Not sure about your syntax - the ESQL sits in a XML file (not an XSL
> > > file), so I am not sure that <xsl:value-of
> > > disable-output-escaping="yes"> will work there?
> > >
> > > The syntax currently looks like:
> > >
> > > <!-- logic section -->
> > >
> > > <xsp:logic>
> > > fName=<esql:get-string column="Name"/>;
> > > </xsp:logic>
> > >
> > > <!-- xml wrapper -->
> > >
> > > <value><xsp:expr>fName</xsp:expr></value>
> > >
> > > This will be transformed by a stylesheet after the XML file is
> > > built...
> > >
> > > Thanks
> > > Derek
> > >
> > > >>> [EMAIL PROTECTED] 26/11/2001 11:42:01 >>>
> > > Derek,
> > >
> > > what about using disable-output-escaping="yes" in your xsl:value-of ?
> > >
> > > Just like in:
> > > <xsl:value-of disable-output-escaping="yes"
> > > select="//sql:rowset/*[name(.)=$dbcol]"/>
> > >
> > > Anyhow, this works with SQLTransformer... no idea with ESQL.
> > >
> > >
> > > Best regards,
> > >
> > > ---------------------------------------------
> > >                Luca Morandini
> > >                GIS Consultant
> > >               [EMAIL PROTECTED]
> > > http://utenti.tripod.it/lmorandini/index.html
> > > ---------------------------------------------
> > >
> > >
> > > > -----Original Message-----
> > > > From: Derek Hohls [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, November 26, 2001 10:34 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [c1] Using Markup Symbols from a Database Field?
> > > >
> > > >
> > > > Does anyone know how to pass through markup symbols from a a
> > > Database
> > > > Field so that they do not appear in the output [HTML] file as &lt;
> > > but
> > > > rather function as the tags they were intended to be - e.g. so that
> > > a
> > > > database field with:
> > > >
> > > > my name <br/> your name
> > > >
> > > > appears as:
> > > >
> > > > my name
> > > > your name
> > > >
> > > > PS Am using ESQL tags to do the the database retrieval
> > > >
> > > > Thanks
> > > > Derek
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > 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]>
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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]>
> > >
> > >
>
> ---------------------------------------------------------------------
> 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]>
>
>



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

Reply via email to