You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Murthy, Ganesh" <gm...@ugs.com> on 2004/09/03 18:07:03 UTC

Encoding of strings in stylesheet parameters

Hi,

I am using stylesheet parameters to pass values to be displayed in the
final html.

Does Xalan-C support multi-byte encodings in stylesheet parameters, and
if it does, which encoding does it expect - Does it expect parameter to
be in the encoding of the input XML document, or of the input XSL
document? Or is it based on the host machine?

My Input XSL is ISO-8859-1. Input XML is determined by database encoding
(may be ISO-8859-1 or any other). Output is UTF-8 by default. Appreciate
any info.

Thanks,
Ganesh.

Re: Encoding of strings in stylesheet parameters

Posted by da...@us.ibm.com.
> I am using stylesheet parameters to pass values to be displayed in the
> final html.
> 
> Does Xalan-C support multi-byte encodings in stylesheet parameters, and
> if it does, which encoding does it expect - Does it expect parameter to
> be in the encoding of the input XML document, or of the input XSL
> document? Or is it based on the host machine?

The APIs expect a XalanDOMString instance, which is always encoded in 
UTF-16.  There is a convenience constructor that transcodes from the local 
code page.  For any other encodings, you will need to transcode the data 
yourself, perhaps by using one the Xerces-C transcoders.

Dave