http://sourceforge.net/forum/message.php?msg_id=2877604
My problem is that I have a double byte
character in my xhtml which requires iso or utf-16 to render it. Can you
suggest how I can remove the declaration and render the double byte
character.
####### XML #######
<?xml version="1.0"
encoding="utf-8"?>
<test>
Here is a copyright symbol © to test:
Heres a copyright entity Ä to test:
Heres a space hash160
between the braces ( ):
Heres an ampersand entity &
</test>
####### XSL #######
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:map="http://www.myorg.co.uk">
<xsl:output
method="xml" encoding="utf-16" indent="yes" doctype-public="-//W3C//DTD XHTML
1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" name="xhtml"
omit-xml-declaration="yes" />
<xsl:template
match="/">
<xsl:result-document
href="test.html" format="xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MyCopyRightTest</title>
</head>
<body>
<h1>TEST</h1>
<p>
<xsl:apply-templates/>
</p>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="test">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
####### RESULT #######
<?xml version="1.0"
encoding="utf-16"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:map="http://www.myorg.co.uk">
<head>
<title>MyCopyRightTest</title>
</head>
<body>
<h1>TEST</h1>
<p>
Here is a copyright symbol © to test:
Heres a copyright entity Ä :
Heres a space hash160
between the braces( ):
Heres an ampersand &
</p>
</body>
</html>
Thanks
Neil A