Re: [xml] loading concatenated documents



http://www.w3.org/TR/REC-xml/#NT-document

[1]     document       ::=       prolog  element  Misc*

Also, I should argue in terms of the spec: Misc is defined as a combination of comments, processing 
instructions and/or whitespace.  AFAIK, It does not say anything about the end of file.

So in other words, libxml is assuming an additional restriction that it must receive an EOF coinciding with 
the end of the document.  However, EOF is just one possible delimiter.  As far as I'm concerned, it would be 
acceptable to mark the first non-Misc character as the end of the document and complete parsing without 
raising a hissy fit.  The specification only defines what goes into a 'document', I'm not aware of any 
specification that warning/error handling must be triggered if anything follows the document other than an 
EOF.

-Ethan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]