Subject: Re: Encoding problem or what else?
From: "FC" <flavio@xxxxxx>
Date: Thu, 8 Dec 2005 15:42:23 +0100
|
----- Original Message -----
From: "George Cristian Bina" <george@xxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, December 08, 2005 09:16
Subject: Re: Encoding problem or what else?
> Hi,
>
> Xerces handles the UTF-8 BOM correctly since many years now. What you
> need to check is how you create the input source for the XML that you
> pass to the transformation. If you pass only the system ID then Xerces
> will escape automatically the BOM if the encoding is UTF-8. If you pass
> a Reader to the parser then it is your task to skip the UTF-8 BOM. IIRC
> there is a bug on Sun bugzilla that says that the InputStreamReader does
> not skip the UTF-8 BOM when you give it a UTF-8 byte stream.
>
> Now the error message: "Document root element is missing." seems
> different than what Xerces gives if you enter a character before the XML
> header: "The processing instruction target matching "[xX][mM][lL]" is
> not allowed." so it is possible that you are using some other XML parser.
>
> Hope that helps,
> George
> ---------------------------------------------------------------------
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
>
Yes, as Micheal explained JDK 1.4.2 is using the "crimson" parser.
Now my problem is to understand how to replace this with xerces.
Thanks!
Bye,
Flavio
| Current Thread |
|
Michael Kay - 8 Dec 2005 08:31:56 -0000
Michael Kay - 8 Dec 2005 08:38:49 -0000
FC - 8 Dec 2005 14:42:02 -0000
|
|