RE: [xsl] International Characters in attributes

Subject: RE: [xsl] International Characters in attributes
From: David_N_Bertoni@xxxxxxxxx
Date: Sat, 10 Feb 2001 22:10:03 -0500
The encoding attribute of xsl:output must be a literal string, so you
cannot dynamically set the output encoding of a stylesheet.

You may want to think about writing a number of stylesheets, each of which
contain different encoding values on xsl:output.  Then, place all of your
templates into another stylesheet and include that stylesheet into each of
the "master" stylesheets.  You could then select the appropriate "master"
stylesheet at runtime, depending on the desired output encoding, and pass
that stylesheet to the XSLT processor.

Hope that helps...


                    "Michael Storm"                                                                                              
                    <Mstorm@xxxxxxxx>                  To:     <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>                                 
                    Sent by:                           cc:     (bcc: David N Bertoni/CAM/Lotus)                                  
                    owner-xsl-list@xxxxxxxxxxxx        Subject:     RE: [xsl] International Characters in attributes             
                    02/09/2001 02:45 PM                                                                                          
                    Please respond to xsl-list                                                                                   

>You might want to output HTML in iso-8859-1 rather than utf-8.

That definitely solves the problem, however, I am not able to hardcode the
encoding type into the XSL, since the application could be viewed by two or
more different viewers at the same time (possiby one viewing a french
version, and another in japanese and another in english). If I set the
encoding in the xsl, its going to force iso-8859-1 output type on the
japanese user, and english user alike. I tried haveing the application
supply a global variable teling the xsl which encoding type to use, but
I use : <xsl:output encoding="$encode_type"/> the Java VM says that it
doesn't support encoding type "$encode_type". Is there a way to evaulate a
variable like that in the encoding attribute, some extension perhaps for
 I'm extremely unfamiliar with how all this encoding works, so maybe I'm
missing something here.

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread