Re: How to pass the right value by "xsl:value select=" to URL in the generated HTML page

At 2003-04-03 13:18 -0600, Guo, Gordon (OTP-KC) wrote:
>     We are using our XSL to generate a HTML page.

XSLT and XPath questions would be better posted to the following list:

   http://www.mulberrytech.com/xsl/xsl-list

There are a number of subscribers who would enthusiastically respond to 
such questions.

There is also an *excellent* FAQ at:

   http://www.dpawson.co.uk

>In the generated page, we
>have an URL to call us back.  In the URL, we need to pass some parameters
>with France characters. These France characters are displayed correctly in
>the page. However, the value of these characters passed into URL are not
>right.
>
>     Our XSL is something like:
>
><?xml version="1.0" encoding="ISO-8859-1" ?>

That defines the input ... to define the output you need ...

<xsl:output encoding="iso-8859-1"/>

... and you need an XSLT processor that respects this, as it does not need 
to be supported by a conforming processor.

>     As mentioned above, the right value of "$em" (déc) is displayed for
>"this month".  However, the wrong value of "$em" (déc) is passed into img's
>src.

You are conflating "displayed" value and "encoded" value ... the "this 
month" is being displayed correctly but is encoded the same way as it is 
encoded in the URL.  Because your browser supports UTF-8, the four 
character encoding is being displayed correctly as three characters.

By specifying the encoding of the output of your transformation, you can 
request how characters are represented both in text and in attributes.  How 
the browser displays them and works with them is a different issue.

I hope this helps.

..................... Ken

--
Upcoming hands-on courses:   Europe (XSLT/XPath):    May  5, 2003
                              Europe (XSL-FO):        May 16, 2003
   (XSLT/XPath and/or XSL-FO) North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc

Received on Thursday, 3 April 2003 14:47:38 UTC