Subject: RE: ISO-8859-1 encoding and XmlDecl omision (was Re: [xsl] Looking up keys in a separate xml file) From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 07 Jan 2004 10:14:39 -0500 |
I currently have the situation where the result of my transform is included as part of a html page using jsp.
I use encoding="ascii" to ensure all of my character refs remain as character refs through to the output,
but for this reason (as Ive just found out) the omit-xml-declaration="yes" is ignored - which means in the middle of my output I have the xml declaration.
HTML being as forgiving as it is, this isnt a problem, but I would like it gone - whats the solution here?
I would have thought that as ascii is a subset of utf-8,
the processor could happily leave the declartion out knowing that any future parsing of the document would use utf-8 (by default) and could correctly read the file.
T:\ftemp>type andrew.xsl <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/"> Hello é World </xsl:template>
</xsl:stylesheet> T:\ftemp>saxon andrew.xsl andrew.xsl
-- North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-02-09 Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] finding an element at the, Mukul Gandhi | Thread | Re: ISO-8859-1 encoding and XmlDecl, David Carlisle |
RE: ISO-8859-1 encoding and XmlDecl, Andrew Welch | Date | Re: ISO-8859-1 encoding and XmlDecl, David Carlisle |
Month |