[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can I parameterise encoding in xsl:output

Subject: RE: Can I parameterise encoding in xsl:output
From: Ben Robb <b.robb@xxxxxxxxxx>
Date: Mon, 5 Feb 2001 09:30:32 -0000
xsl output encoding param
The encoding attribute of the <xsl:output> element is set as a string.
[Actually, a case-insensitive ASCII string either a charset registered with
IANA, or an ASCII string starting with "x-"].

This means that you can't take a parameter and expect its value to be
evaluated by the processor. 

Mike - is the fact that SAXON doesn't report an error a bug? MSXML falls
over:

Error Type:
msxml3.dll (0x80004005)
System does not support the specified encoding

Ben

-----Original Message-----
From: Yusuf Goolamabbas [mailto:yusufg@xxxxxxxxxxxx]
Sent: 05 February 2001 06:30
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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@xxxxxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.