Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Encoding of a XML +XSL -> HTML tranformation

843834Nov 18 2002 — edited Nov 19 2002
Hello:

I've run into a problem transforming a XML doc. containing results retrieved from a database and later passed from a EJB to a servlet. The thing is that the database contains data formatted with encoding="ISO-8859-1", the XML doc. I create based on this data is also formatted with this encoding and looks like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="http://localhost:8080/liteClient/combos.xsl">
<authors>
<row>Staffan Truv�</row>
<row>Christopher Ahlberg</row>
</authors>

You would ask how does the xsl file (combos.xsl) looks like, here it is:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<xsl:template match="/">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; encoding=ISO-8859-1"/>
<TITLE>Query options</TITLE>
</HEAD>

Nothing fancy as you can see, however, the HTML displayed shows strange characters, for instance, in the author Staffan Truv� (See XML document)the HTML displays: Staffan Truv&#9500;�.

This is a problem for the name is embedded in a combo box (drop down list) to be used as a search parameter, obviously, as the string displayed is different the value sent when searching does not exist in the database and the result is null

Do you know how to set the encoding in this special case, for reference, I depend on the XSLT processor from I. Explorer 6 given that the processing is done in the client side (The browser) due to a client requirement, that is a problem because I already found a way to set the output encoding but using xt by James Clark.

I highly appreciate your help since this problem is the only thing that is delaying the project completion.

Thanks a lot for taking the time to read this.


Ugo Posada
Zarpa Software
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2002
Added on Nov 18 2002
4 comments
142 views