xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Peters <pet...@signal7.de>
Subject Encoding in attribute values
Date Thu, 27 Apr 2000 08:55:23 GMT
Hello.
Maybe someone can help me with this problem, cause I don't know if this is 
a bug or a feature...
System is xalan1.0.1/xerces1.03/linux

Suppose <Article> has an attribute (@headline) with text in SO-8559-2 - 
encoding

Using the following stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
   <xsl:output method="html"
               indent="yes"
               encoding="ISO-8559-2"/>
  <xsl:template match="Article">
     <html>
     <head>
     <meta http-equiv="content-type" content="text/html; 
charset=ISO-8559-2"/>
     </head>
     <body>
      <form>
        <input type="text" value="{@headline}"/>
        <textarea>
         <xsl:value-of select ="@headline"/>
        </textarea>
     </form>
  </xsl:template>
</xsl:stylesheet>

leads to a resulting html:
.....
<input type="text" value="&#x17b;ydzi ">
<textarea>
&#379;ydzi
</textarea>

The parser seams to treat attributes different....

I understand, that both representations are correct, but 4.x-Browsers 
cannot display the hex-representation in input fields, leading to problems 
when creating forms for different nationalities.
Is there a way to tell the parser to use the same representation in either 
case??

thanks
frank



(-) Frank Peters
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665403, Fax: 06151 665373
(-) peters@signal7.de, www.signal7.de


Mime
View raw message