No, the problem is not there : this script line is generated automatically
and correctly by the stylesheet. It generates the character itself :

parent.centerFrame.location.hash='#puissance réelle';

and the character is then correctly replaced by "é" by the
HTMLSerializer.


The problem is that this character is replaced by "%C3%A9" (instead of
"é") when it is inside the "name" attribute of an anchor. Is this a
correct behaviour ?


Matthieu


> -----Message d'origine-----
> De : KOZLOV Roman [mailto:[EMAIL PROTECTED]]
> Envoyé : lundi 18 mars 2002 12:36
> Cc : Cocoon-Users
> Objet : Re: Different behaviours of HTMLSerializer, in attributes and
> elements.
>
>
> Hello,
>
> IMHO, in the script line you have to put the character itself and
> not "é"
> because such an entity will not be substituted. So try the following:
>
> parent.centerFrame.location.hash='#puissance réelle';
>
> PS: I've not checked if the "%C3%A9" in an element's name will be
> translated by
> script interpreter (and I don't know exactly a kind of
> interpreter you use) so
> perhaps you need xsl:attribute element with CDATA section in your
> XML source.
>
> Best regards
>     Roman
>
> Matthieu Benéteau wrote:
>
> > 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]>
>


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