Hi,

I have a little problem with the HTMLSerializer and accented letters in
French.
I'm working with Cocoon 2.0.1.
All my XML files and stylesheets and all my components use the iso-8859-1
encoding.


In my XML file I have the following element, which has an é letter in
attribute "nom" :

<dimensionPhysique nom='puissance réelle' indexDimension='9'/>


This element is correctly processed by a stylesheet to give the following
XHTML :

<a name="puissance réelle"></a>
<table>
  <tr>
    <td bgcolor="#EEDDEE">
      <b>Dimension name :</b>
      puissance réelle
      <br/>
      <b>Dimension index :</b>
      9
    </td>
  </tr>
  ...
</table>

So now the accented letter appears twice : once in the "name" attribute of
an anchor, and once in the content of a table row. No problem here.


The problem appears after serialization with the HTMLSerializer, which gives
the following HTML :

<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
...
<a name="puissance r%C3%A9elle"></a>
<table>
  <tr>
    <td bgcolor="#EEDDEE">
      <b>Dimension name : </b>
      puissance r&eacute;elle
      <br/>
      <b>Dimension index : </b>
      9
    </td>
  </tr>
  ...
</table>

In the "name" atribute of the anchor, the &eacute; letter has been replaced
by %C3%A9, so the following instruction will fail :
parent.centerFrame.location.hash='#puissance r&eacute;elle';


IMHO, this is not a correct behaviour of the HTMLSerializer.
Am I right ?


Matthieu




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