On 12/15/2012 10:29 AM, Michael Blakeley wrote:
> Apparently the extra blank line at the beginning is enough cause problems. So 
> check your input to see if it has leading whitespace of any kind.
>
> I don't know whether this parser behavior is a bug or not. It seems 
> unforgiving, but http://www.w3.org/TR/REC-xml/#sec-prolog-dtd and 
> http://www.w3.org/TR/xml11/#sec-prolog-dtd both suggest that it's the correct 
> behavior. Neither grammar permits whitespace before the XMLDec, as long as 
> one is present. On the other hand the XMLDecl is optional, and if omitted you 
> can apparently have as much leading whitespace as you like.
>
I think what happens when there is white space before the xml 
declaration is that the parser is no longer looking for an xml 
declaration and instead expects a processing instruction, a comment, or 
an element: the xml declaration appears to match the processing 
instruction rule, but then xml is not allowed as a processing 
instruction name: hence the error.

-Mike
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to