Re: [xsl] Top Level Element Error

Subject: Re: [xsl] Top Level Element Error
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Mon, 08 Nov 2004 03:05:58 -0800
Andrew Welch wrote:

If I remember correctly, there is a 'feature' of the Crimson XML parser
which means it treats the BOM (byte order mark) at the start of UTF-16
encoded file as text, and so throws an error when it encounters your
opening <xsl:stylesheet> element. This is compounded by the fact that
Notepad inserts a BOM even if you save the file as UTF-8 (not sure why,
or what use it would be).


Nice Andrew! This will definitely get stored in my "things to remember" database! Is this noted in the FAQ???

It's possible then that you are using Notepad and saving your file as
either UTF-8/UTF-16, and then using Crimson to parse it. The fix is to
use Xerces instead of Crimson (and you should never use Notepad ;)


Ahh, yes, totally agree... although Notepad2 (http://www.flos-freeware.ch/notepad2.html - not an MS product) is a nice little editor for quick and dirty (refering to the phrase "quick and dirty" in general and not the output of the editor) editing. Obviously the two have nothing in common beyond the name, buts its worth mentioning as it is a nice tool and worthy of promotion.

Cheers!

<M:D/>

Current Thread