[Expat-bugs] [ expat-Bugs-972802 ] Xml document which begin with an empty line

SourceForge.net noreply at sourceforge.net
Fri Jul 23 06:06:09 CEST 2004


Bugs item #972802, was opened at 2004-06-14 16:51
Message generated for change (Comment added) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=972802&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Xml document which begin with an empty line

Initial Comment:
In a xml document which begins with an empty line, for
example:
"""Start here"""

<?xml version="1.0" ?>
<bugged></bugged>
"""End here"""

Expat give this parse error: 
XML Parsing Error: xml processing instruction not at
start of external entity.
I discoverd this bug when I tried to pass an xhtml
document to firefox via ASP.NET with the
"application/xhtml+xml" content-type.


----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-07-23 00:06

Message:
Logged In: YES 
user_id=3066

Karl, did you want to do anything with this for 1.95.8?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-06-15 08:55

Message:
Logged In: YES 
user_id=290026

>From the XML spec:
[1]    document    ::=    prolog element Misc*
[22]    prolog    ::=    XMLDecl? Misc* (doctypedecl Misc*)? 
[23]    XMLDecl    ::=    '<?xml' VersionInfo EncodingDecl? 
SDDecl? S? '?>' 

Which means that it is an error if an XML document starts
with an empty line. So Expat is OK. However, Expat's error
message could be improved to say: "XML/Text declaration
not at start of external entity".

So maybe we should change the message.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=972802&group_id=10127


More information about the Expat-bugs mailing list