[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wrong encoding value: "Content is not allowed in
On 28/07/2010 15:39, Ben Stover wrote:
This isn't really an xsl question 9even though you show a saxon error, it (as it says0 is just passing on the error from the parser. Assume I have an XML doc file which starts with: It depends. If the file is being read from the file system then this would be a fatal error. If it is being served by http and the correct encoding is specified in the http headers then the xml rec says they take precedence so technically the file is OK, although playing dangerously because if the file is ever saved and reloaded using a protocol that doesn't preserve the http header (eg saving it to a filesystem and re-reading) then it will break.
well the actual error message is a bit confused as to the error location but having got to the utf-16 it probably decided to read the file in utf16 in which case <?xml would be some random content (whatever character the two bytes <? denote in utf16) that isn't allowed at the start of an xml file, hence the message. David Ben ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|
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
|