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

"SourceForge.net" <[email protected]>
Newsgroups gmane.text.xml.expat.bugs
Message-ID <[email protected]>
Bugs item #972802, was opened at 2004-06-14 16:51
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=972802&group_id=10127

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
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: Karl Waclawek (kwaclaw)
Date: 2004-12-21 13:32

Message:
Logged In: YES 
user_id=290026

Changed error message to:
"XML or text declaration not at start of entity".
Applied in xmlparse.c rev. 1 140.
Closing this issue.

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-08-04 11:52

Message:
Logged In: YES 
user_id=290026

Let's leave this as an improvement for release 2.0.

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

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.