Rajeev,
XSLTC is URL-encoding a non-URL attribute, so I suspect this is a bug. You
should try the same stylesheet with interpretive Xalan. If you get a
different result, and it's the result you expect, file a bug report and
attach a minimal set of inputs to reproduce the problem.
Dave
"Sachdeva,
Rajeev" To: "'Antony Quinn'"
<[EMAIL PROTECTED]>, [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc: (bcc: David N
Bertoni/Cambridge/IBM)
a.com> Subject: RE: special character
12/03/2002 08:34
AM
I have used ISO-8859-1 encoding in xsl.
The strange thing about this transformation is that when I give Å in
<TD> it works fine whereas if I give as <TD><INPUT name="test"
value="Å"/></TD> it gives me %c5 value.
Regards.
Rajeev Sachdeva
Energy & Utilities
Logica
Direct Line: 01224 388845
www.logica.com
-----Original Message-----
From: Antony Quinn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 4:27 PM
To: [EMAIL PROTECTED]
Subject: RE: special character
Rajeev,
Which character encoding are you using?
Antony
-----Original Message-----
From: Sachdeva, Rajeev [mailto:[EMAIL PROTECTED]
Sent: 03 December 2002 15:53
To: 'Antony Quinn'; [EMAIL PROTECTED]
Subject: RE: special character
Thanks for your reply, but my problem is still not resolved, I tried both
the ways and
I get Å as a result of first option and %c5 as a result of second
option.
I have tried giving disable-output-escaping="yes" in value-of tag and that
too didn't
work.
For your information I am using Apache's XSLTC for XSL transformation,
using
translet for transformation.
Following are the parameters used to provide TransformerFactor class to
create translet :
String key = "javax.xml.transform.TransformerFactory";
String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl";
Regards.
Rajeev
-----Original Message-----
From: Antony Quinn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: RE: special character
Rajeev,
There are two methods you could use:
1. Use &#197; instead of Å ie:
<xsl:variable name="special_character">&#197;</xsl:variable>
2. Use an ENTITY declaration, e.g.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY special-character "Å">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/">
<xsl:element name="INPUT">
<xsl:attribute name="name">test</xsl:attribute>
<xsl:attribute name="value">&special-character;</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Regards,
Antony
P.S. A simpler method to produce an INPUT tag is as follows:
<xsl:template match="/">
<INPUT name="test" value="&special-character;"/>
</xsl:template>
-----Original Message-----
From: Sachdeva, Rajeev [mailto:[EMAIL PROTECTED]
Sent: 03 December 2002 11:26
To: '[EMAIL PROTECTED]'
Subject: special character
Hi,
Does anyone know how to display special character in Input element text
line
?
Code snippet in xsl :
<xsl:variable name="special_character">Å</xsl:variable>
<xsl:element name="INPUT"> <!-- INPUT -->
<xsl:attribute name="name">test</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="$special_character"/>
</xsl:attribute>
</xsl:element>
Expected result : �
Acutal Output in Input element : %c5 <-- Wrong
How to display � instead of %c5 in HTML Input element ?
Thanks for your help.
Regards.
Rajeev Sachdeva
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.