Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] 16-bit entities converted to "?" by XSLT

From: John English <je@-------------->
To:
Date: 12/7/2008 2:58:00 PM
Michael Kay wrote:
My browser shows this correctly, but when I embed it in some 
XML and run it though my stylesheet, the output is this:



  <span style='font-size: 11pt; font-family: Arial;' lang='HE'>
     ????
  </span>


When you say the output "is" this, I suspect you mean the output "looks
like" this, when displayed using some piece of software to some output
device. Are you sure that piece of software and that output device are
capable of rendering Hebrew characters correctly? Because it's very likely
that the XSLT output is correct, but can't be displayed the way you are
trying to display it.

What I showed was what went into the transform (character codes) and what
came out (actual genuine 0x3F "?" characters). My browser is quite happy with
Hebrew: I some pasted Hebrew text into an input box and hit the "update" button
on the page. It was then stored in my DB as the character references I showed.
When the page is redisplayed, the "current value" (the Hebrew character refs)
is transformed into question marks and immediately below that is the input box
containing the Hebrew characters ready for further editing.

If I take the original <span> that gets sent to the XSLT transformer and stick
it in a file called foo.html, it displays correctly with no fuss at all. So the
problem is not in the browser's charset.

Moreover, as I said, it appears correctly in the textarea immediately below the
place where the current value is displayed. The reason it appears correctly in
this case is that the XML in this case contains the following embedded HTML:

  <div>
    <textarea>
      &lt;span style='font-size: 11pt; font-family: Arial;' lang='HE'&gt;
        &amp;#1499;&amp;#1514;&amp;#1493;&amp;#1489;
      &lt;/span&gt;
    </textarea>
  </div>

which only contains 8-bit entities at transformation time.



----------------------------------------------------------------------
 John English              | mailto:je@xxxxxxxxxxxxxx
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 School of Computing & MIS | "Those who don't know their history
 University of Brighton    |  are condemned to relive it" (Santayana)
----------------------------------------------------------------------


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent