[xslt] isn't nonbreaking space in iso-8859-1 encoding?

When I process a document with encoding iso-8859-1 that contains a nonbreaking space   character to XML output in the same encoding, the nonbreaking space character does not survive. It comes out as Unicode � the replacement character. My reference says that   is a native character for encoding iso-8859-1. Is this a bug, or am I not understanding something?

Here is a short test document:

<?xml version="1.0" encoding="iso-8859-1"?>
<para>nonbreaking space&#xA0;and more.</para>

and a short stylesheet that demonstrates the problem:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";

<xsl:output encoding="iso-8859-1" method="xml"/>

<xsl:template match="/">

<xsl:template match="para">

xsltproc -version
Using libxml 20626CVS2823, libxslt 10117CVS1069 and libexslt 813CVS1069
xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
libxslt 10117 was compiled against libxml 20626

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]