This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: encoding problem
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] encoding problem
- From: "Frank Chen" <frank63 at ms5 dot hinet dot net>
- Date: Thu, 31 May 2001 16:53:19 +0800
- References: <20010531094526.D16542@kiefer.TechFak.Uni-Bielefeld.DE>
- Reply-To: xsl-list at lists dot mulberrytech dot com
It looks like you should have a text declaration in the entity:
<?xml version="1.0" encoding="iso-8859-1"?>
<entry time='991146682'>
<name>Joe User</name>
<email>juser@some.where</email>
...
</entry>
<entry time='...'>
...
</entry>
>
> Hi!
>
> I have a problem concerning the encoding of the involved documents. The
> story is this:
>
> - I have a simple web form, and the results are collected in a simple
> XML file "result.xml":
>
> <entry time='991146682'>
> <name>Joe User</name>
> <email>juser@some.where</email>
> ...
> </entry>
>
> <entry time='...'>
> ...
> </entry>
>
> and so on.
>
> - To process this file with XSLT, I wrap it into a dedicated top element:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE results [
> <!ENTITY formresult SYSTEM "result.xml">
> ]>
>
> <results>
> &formresult;
> </results>
>
> and use a style sheet that iterates over all "entry" children of the
> "results" node.
>
> The result file contains Latin 1 characters, at least I'm pretty sure it
> is Latin 1 and not something else. When I process the file, I get errors
>
> results.xsl:15: error: Input is not proper UTF-8, indicate encoding !
> <projects>Einf|hrung in die Bioinformatik
> ^
> results.xsl:15: error: Bytes: 0xFC 0x68 0x72 0x75
> <projects>Einf|hrung in die Bioinformatik
> ^
>
> with xsltproc (from libxslt) and just
>
> XSLT Error (java.lang.InternalError): null
>
> with Xalan. When I replace the entity in the wrapper file with the actual
> content of the file, both processors accept the file and process the style
> sheet.
>
> Any explanation what is going wrong and any help on how to solve this
> problem are appreciated.
>
> --
> Joern Clausen
joern@TechFak.Uni-Bielefeld.DE
> Faculty of Technology
http://www.TechFak.Uni-Bielefeld.DE/~joern/
> Bielefeld University, Germany +49
(0)521/106-2905
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list