Re: Wrong encoding value: "Content is not allowed in
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.
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
In practice "Content not allowed in prolog" is a very generic way of reporting that the parser can't make sense of the bytes at the start of the file, and an incorrect encoding is one possible reason for that failure.
Michael Kay Saxonica
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format