cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pmirco@inwind.it" <pmi...@inwind.it>
Subject escaping special characthers: xsp or xslt problem?
Date Tue, 03 Dec 2002 13:45:51 GMT
I'm reading some data from a database (mysql) using an xsp page.

My xsp is very simple, something like:
<esql:results>
  <news>
    <esql:row-results>
      <title><esql:get-string column="title"/></title>
    </esql:row-results>
  </news>
</esql:results>

Then I fill a text field using this data:

<input type="text" name="title" size="50" maxlength="100">
  <xsl:attribute name="value"><xsl:value-of select="normalize-space
(news/title)" disable-output-escaping="yes"/></xsl:attribute>
</input>

When I wrote my data into the database, I converted special characters 
like "à" to "à" (I think this is a good practice, but correct me 
if I'm wrong!).

My problem is that the result after XSLT processing is:
<input maxlength="100" size="50" name="titolo" type="text"
value="&amp;#224;">
and this is not what I really want, 'cause the user don't see the 
character "à" but the string "à".

As you can see, I've used the attribute "disable-output-escaping", but 
the output IS escaped.
If I try to output the content of (news/title) with a simple <xsl:value-
of select> (not wrapped by xsl:attribute), the characther is displayed 
as I expect.

any suggestion?



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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