Subject: RE: SAXON and UTF-8
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Thu, 27 Sep 2001 16:35:24 +0200
|
Windows Notepad saves UTF8 files with Byte Order Mark, and AFAIK, the XML
parser in Saxon (AElfred) doesn't support this (at least it didn't last time
I checked).
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Gustaf
> Liljegren
> Sent: Thursday, September 27, 2001 4:15 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: SAXON and UTF-8
>
>
> Thanks Mike,
>
> > This message suggests that there's no problem with your UTF-8, but
> > there is a problem with your XML. Without seeing the file, I can't
> > tell you what the problem is.
>
> The original document was too large to quote, but here's an example that
> triggers the same error in SAXON:
>
> <?xml version="1.0"?>
> <a>ä</a>
>
> The file is called "a.xml" and I intend to store it in UTF-8, so
> there's no
> need to declare the use of Latin 1. Here's the stylesheet:
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:template match="a">
> <b><xsl:value-of select="."/></b>
> </xsl:template>
> </xsl:stylesheet>
>
> This is the result when I save a.xml in "Unicode" format:
>
> <?xml version="1.0" encoding="utf-8"?><b>ä</b>
>
> As expected, but why is the encoding declaration added?
>
> When saving a.xml in "UTF-8" I get the same error as before:
>
> E:\test>saxon a.xml a.xsl > b.xml
> Fatal error reported by XML parser: required character (found
> "?") (expected
> "<"
> )
> URL: file:/E:/test/a.xml
> Line: 1
> Column: 5
> Error
> required character (found "?") (expected "<")
> Transformation failed
>
> EditPlus seem to inherit the UTF-8 and Unicode functionality from the
> Windows API, so therefore I get the same error when saving as UTF-8 in
> Notepad in Windows 2000.
>
> Regards,
>
> Gustaf Liljegren
>
>
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
Gustaf Liljegren - Thu, 27 Sep 2001 10:24:14 -0400 (EDT)
- Goetz Bock - Thu, 27 Sep 2001 10:41:57 -0400 (EDT)
- Julian Reschke - Thu, 27 Sep 2001 10:51:24 -0400 (EDT) <=
- Michael Kay - Thu, 27 Sep 2001 12:33:30 -0400 (EDT)
- Julian Reschke - Thu, 27 Sep 2001 12:50:42 -0400 (EDT)
- Michael Kay - Fri, 28 Sep 2001 03:43:09 -0400 (EDT)
- Julian Reschke - Fri, 28 Sep 2001 04:04:15 -0400 (EDT)
|
|