Hi
I'm
trying to output an xhtml document using xslt 2 and saxon8. I'm trying to
remove the xml declaration from the resultant document but this only seems to
work in uft-8, although its suggests otherwise here.
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
CONFIDENTIAL
NOTICE
This communication contains information which is confidential and
may also be privileged. It is for the exclusive use of the intended
recipient(s). If you are not the intended recipient please note that any
distribution, copying or use of this communication or the information in it is
strictly prohibited. If you received this communication in error, please
notify us by e-mail or by telephone (020 7770 7000) and then delete the e-mail
and any copies of it. (v..9)