Difficulty with ISO-8859-1 encoding

Subject: Difficulty with ISO-8859-1 encoding
From: Michael Laing <mpl@xxxxxxxx>
Date: Tue, 23 Nov 1999 17:50:21 -0500
When I process the following 3 related files using XT I get an error on
a valid ISO-8859-1 character despite the encoding attributes.

*Here's the command I used:
java com.jclark.xsl.sax.Driver tester.xml tester.xsl

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tester SYSTEM "tester.dtd">
<tester>
   &cent;
</tester>

<!-- tester DTD	-->
<!ELEMENT tester (#PCDATA)>
<!ENTITY cent	"¢">

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--tester.xsl-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
  <xsl:value-of select="tester"/>
</xsl:template>
</xsl:stylesheet>

*Here's the error:
file:/home/mlaing/xsl/tester.dtd:3: character not allowed


If I use UCS it works OK - unfortunately most the real DTD's I have to
work with use ISO-8859-1...

Here are files that work:

<?xml version="1.0"?>
<!DOCTYPE tester SYSTEM "tester.dtd">
<tester>
   &cent;
</tester>

<!-- tester DTD	-->
<!ELEMENT tester (#PCDATA)>
<!ENTITY cent	"¢">

<?xml version="1.0"?>
<!--tester.xsl-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
  <xsl:value-of select="tester"/>
</xsl:template>
</xsl:stylesheet>

Is there something else I need to do to use ISO-8859-1? And what
component is reporting this error anyway?

Thanks,
Michael Laing


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


Current Thread