You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Duy Tran <du...@yahoo.com.au> on 2002/02/20 06:38:01 UTC

disable-output-escaping="yes"

Hi

I believe this is bad programming practice as you
said...

Please show me a way to get around the problem.
I use XSP to retrieve data from the database to make a
combobox with the options from the data

    ... while (rs.next()){
                    str = str +  "<option> " +
rs.getString("name") + "</option>";
                }
          return str;

Because str is a string, therefor '<' is &lt; So the
XSL does not consider it as
a markup...


How can I make a '<' in a string not &lt; so that
xsl considers it as a markup

Please help.

Regards

Paul White

http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.

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


RE: disable-output-escaping="yes"

Posted by Vadim Gritsenko <va...@verizon.net>.
See simple.xsp in the sample webapp and <xsp:element/>, <xsp:attribute/>
tags.

while (rs.next()){
  <xsp:element
name="option"><xsp:expr>rs.getString("name")</xsp:expr></xsp:element>
}

Vadim

> -----Original Message-----
> From: Duy Tran [mailto:duytranau@yahoo.com.au]
> Sent: Wednesday, February 20, 2002 12:38 AM
> To: cocoon-users@xml.apache.org
> Subject: disable-output-escaping="yes"
> 
> Hi
> 
> I believe this is bad programming practice as you
> said...
> 
> Please show me a way to get around the problem.
> I use XSP to retrieve data from the database to make a
> combobox with the options from the data
> 
>     ... while (rs.next()){
>                     str = str +  "<option> " +
> rs.getString("name") + "</option>";
>                 }
>           return str;
> 
> Because str is a string, therefor '<' is &lt; So the
> XSL does not consider it as
> a markup...
> 
> 
> How can I make a '<' in a string not &lt; so that
> xsl considers it as a markup
> 
> Please help.
> 
> Regards
> 
> Paul White
> 
> http://movies.yahoo.com.au - Yahoo! Movies
> - Vote for your nominees in our online Oscars pool.


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