473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Xalan problem with xsl:attribute and Japanese characters

Hello,

I am having a problem with Xalan transforming a document containing Japanese
characters. (An initial note: the problem does not occur on my Windows
development machine, only on the Solaris test/production environments.)

The basic problem is that for any place I'm selecting XML node values to use
within an xsl:attribute block, if the text is double-byte it is converted to
the NCR representation instead of the actual characters. Under Windows, the
"real" characters appear within the attribute tag. I'm positive the source
XML is UTF-8 encoded, as I can output the value correctly within the same
stylesheet as long as it is not output within an xsl:attribute tag.

Here's an XSL snippet--the basic idea is I'm creating a bunch of HTML fields
and setting the "value" attribute to a selected XML element value:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" omit-xml-declaration="yes" method="html"/>
.........

<xsl:template match="//root/row">

<tr>
THIS VALUE IS KANJI AND GETS OUPUT AS NCR

<td width="400" class="label" height="18">
<input type="text" name="companyAffiliation" size="50">
<xsl:attribute name="value">
<xsl:value-of select="companyAffiliation"/>
</xsl:attribute>
</input>
</td>
</tr>

<tr>
USING A TEXTAREA WITHOUT XSL:ATTRIBUTE, IT OUTPUTS CORRECTLY

<td width="400" class="label" height="18">
<textarea name="companyAffiliation2" rows="1" cols="50">
<xsl:value-of select="companyAffiliation"/>
</textarea>
</td>
</tr>

</xsl:template>

Any ideas?
Apr 4 '08 #1
0 1609

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: debo_nair | last post by:
I could successfully create PDF docs on fly from XML and open it within acrobat using FOP. I have a servlet on weblogic which uses XSLTInputHandler(xml,xsl) and renders the XML in PDF. My...
2
by: Robert M. Gary | last post by:
I'm using JRE 1.5 on Solaris Japanese (Sparc). The JVM claims its default character set is EUC-JP I'm seeing two strange things when using Japanese character sets... 1) If I write a program that...
5
by: ibiza | last post by:
Hi all, I am quite experimented with SQL Server, but not that much with full text indexing. After some successful attempts with english fields, I've decided to try it with Japanese characters. I...
0
by: CtrlAltDel | last post by:
This isn't a PHP issue per say, but I guess a question to other PHP developers. I've just recently converted everything I got to Unicode UTF-8 which introduced me to the "problems" dealing with...
2
by: ramapathi | last post by:
Hi All, can any one help me how to access the xsl attribute in java script of jsp? Thanks Rams
5
by: John Gordon | last post by:
My XSLT files have many occurrences of this general pattern: <a> <xsl:attribute name="href"> <xsl:value-of select="xyz" /> </xsl:attribute> </a> When I execute an XSL transform, the...
2
by: lunet | last post by:
hello, this has been asked before but no answers yet.. I need help! how can write a webservice method with attribute ? like this xml : <soap:Envelope...
4
by: chemlight | last post by:
I'm having some troubles with the japanese character set and mysql. I have a list of vendors with their languages in a table. The language list for Japanese has been stored in Japanese. When I...
5
by: prao2005 | last post by:
Q) How to check whether the value of an attribute is not null or if the lenght of characters in the value of an attribute is greater than 0? Solution applied --> s0SelectedSite is an attribute...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.