[xsl] encoding on parameters for document function (using saxon)

Subject: [xsl] encoding on parameters for document function (using saxon)
From: Christian Wittern <wittern@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Oct 2005 20:16:12 +0900
Dear xsl users,

The problem I have is the following.  I am constructing a URL to pass
as a parameter to the document function, as in
document('http://myserver.com/getthis?file=$m'). The $m part of this parameter
consists of non-ASCII characters.  When I tested this from within
oXygen, everything worked as expected, but running this with Saxon
6.5.4 from the commandline garbles the encoding of the parameter that
gets passed on the URL the characters seem to get garbled and the
result does not make any sense.  I tried to set the processing
environment on the command line explicitly to UTF-8, which is also the
encoding of my file and the output encoding set within the XSL file,
but to no avail. I also tried to use the Java url-encode function as
described in the FAQ, but that also did not achieve the desired reult.

In case this is important, I tried it on Mac OS X 10.3 and 10.4, both
of which are using Java 1.42 (or so I think).

Any help is very much appreciated,

Christian

-- 
 Christian Wittern 
 Institute for Research in Humanities, Kyoto University
 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN

Current Thread