Subject: Re: [xsl] Wrong encoding value: "Content is not allowed in prolog." ? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Thu, 29 Jul 2010 09:42:30 +0100 |
Assume I have an XML doc file which starts with:XSLT processors don't care. They pass off the work to an XML parser. Which is why, when a failure occurs, Saxon is careful to tell you that the error comes from the XML parser, not from Saxon itself.
<?xml version="1.0" encoding="UTF-16"?> <foobar>....
But the xml doc file is NOT UTF-16 encoded but ANSI or ISO-8859-1 or whatever. Does it matter?
I mean does an XSLT processor like Saxon (or other) view this as nice to have info but rely on the real encoding?
That's another way of saying: you can choose from a wide range of parsers to run with Saxon, and if you choose one that has poor error messages, that's your problem not mine. (The one I generally recommend is the Xerces parser from Apache, but the one that most people use is the Xerces-derivative contained in the Sun/Oracle JDK; Sun's main contribution was to add bugs.)Error on line 1 column 40 of in.xml: SXXP0003: Error reported by XML parser: Content is not allowed in prolog. Transformation failed: Run-time errors were reported
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Wrong encoding value: "Co, David Carlisle | Thread | [xsl] ancestor::* and for-each, Wolfgang Laun |
Re: [xsl] Help with transforming un, Jack Bush | Date | Re: [xsl] Where in the XPath 2.0 is, Michael Kay |
Month |