This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Can I parameterise encoding in xsl:output
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Can I parameterise encoding in xsl:output
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Mon, 5 Feb 2001 13:12:48 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
If you use a processor that supports the TrAX API, you can call
setOutputProperty() from your Java application, overriding anything within
the stylesheet.
Mike Kay
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Yusuf
> Goolamabbas
> Sent: 05 February 2001 06:30
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] Can I parameterise encoding in xsl:output
>
>
> Hi, I have the following simple XSL file
>
>
> <?xml version="1.0"?>
> <xsl:stylesheet
> version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:template match="/">
> <html>
> <head>
> <title>foo</title>
> </head>
> </html>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Given, the following input XML
> <?xml version="1.0" ?>
> <dummy/>
>
> The output at least from 4xslt http://www.fourthought.com/ is
>
> <html>
> <head>
> <META HTTP-EQUIV='Content-Type' CONTENT='text/html;
> charset=UTF-8'>
> <title>foo</title>
> </head>
> </html>
>
> I am looking to generate output in different languages via the use of
> parameters and with the source files having appropiate XML fragments,
>
> however as such with the above tag generated needs to be
> parameterised else
> browsers will get confused
>
> I thought of doing this
>
> <xsl:param name="enc" select="'iso-8859-1'"/>
> <xsl:output
> encoding="$enc"
> />
>
> but this doesn't seem to work. 4xslt bombs out whereas Saxon
> 6.0.2 gives
> the following
> <meta http-equiv="Content-Type" content="application/xml;
> charset=$enc">
>
> Any suggestions ?
>
> --
> Yusuf Goolamabbas
> yusufg@outblaze.com
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list