Thanks Dave, that helps. I have one question though - if I want to do string-based comparisons of a stylesheet parameter (which will always be UTF-16-encoded) within my Stylesheet (which happens to be us_ascii/ISO-8859-1-encoded), then I am thinking the comparisons are likely to fail (for e.g parameter=="true" then do this). Isn't that true? Is there a workaround in that case?
Btw, what is the reason XalanTransformer is designed to use UTF-8 as the default (for output encoding) but XalanDOMString uses UTF-16 (for input encoding)? Thanks, Ganesh. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 1:27 PM To: [email protected] Subject: Re: Encoding of strings in stylesheet parameters > 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
