XML that is NOT well formed is displayed when a certain stylesheet is applied.

VERIFIED FIXED in mozilla0.8

Status

()

Core
XML
P3
major
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Chris Petersen, Assigned: harishd)

Tracking

Trunk
mozilla0.8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [rtm-][fix in hand]R=nisheeth, sr=vidur)

Attachments

(3 attachments)

(Reporter)

Description

17 years ago
Build: 2000102508
Platform: All
Expected Results: The parser error should occur.
What I got: The document's content is rendered (with style applied).

Steps to reproduce:

1) Save attached xml and css documents:

2) Open the xml document in N6.

3) The document's content is rendered.

4) Since the document is not well-formed, a parser error should be displayed.
(Reporter)

Comment 1

17 years ago
Created attachment 17995 [details]
A xml document that's not well formed
(Reporter)

Comment 2

17 years ago
Created attachment 17996 [details]
a stylesheet
(Reporter)

Comment 3

17 years ago
This problem occurs if the stylesheet is referenced in the xml file (whether or
not the css href can be found). If you remove the xml-stylement declaration, the
parser will display the error properly.
(Reporter)

Comment 4

17 years ago
Basically, the xml document must not be well-formed and have a stylesheet
applied to reproduce this bug.
(Reporter)

Comment 5

17 years ago
Nominating this bug.
Keywords: rtm
(Reporter)

Comment 6

17 years ago
IE 5 (Mac) displays a parser error when attempting this xml document. The 
following tags are not closed: main. 
Updated the severity to major. XML applications MUST report well-formedness errors.
Severity: normal → major
(Reporter)

Comment 8

17 years ago
Looking at this issue further, the problem only occurs if the root element is 
missing the end tag. If a child element (inside the well-formed root element) is 
missing a end tag, you get a parser error.

Comment 9

17 years ago
Marking this rtm need info.  About to look at it.
Status: NEW → ASSIGNED
Whiteboard: [rtm need info]

Comment 10

17 years ago
The problem here is that when the stylesheet PI is included in the attached XML 
document, the expat tokenizer's DidTokenize() method is never called with the 
aIsFinalChunk parameter set to true.  Because of this, expat keeps thinking that 
more content is about to come down the pipe and does not throw an error.

When the stylesheet PI is removed, the DidTokenize() method *is* called with the 
aIsFinalChunk parameter set to true and expat throws an error.  This is the 
right behavior.

We need to figure out why, when the stylesheet PI is included, DidTokenize() is 
never called with aIsFinalChunk set to true.

Over to Harish.
Assignee: nisheeth → harishd
Status: ASSIGNED → NEW
(Assignee)

Comment 11

17 years ago
Created attachment 18516 [details] [diff] [review]
Proposed fix.

Comment 12

17 years ago
This needs a r= and a sr= to make it in.

Changing the summary to make the severity more important.
Summary: With the stylesheet applied , the browser will rendered a document that's not well-formed. → XML that is NOT well formed is displayed when a certain stylesheet is applied.
Whiteboard: [rtm need info] → [rtm need info] NEEDS R=, NEED SR=

Comment 13

17 years ago
umm /s/important/apparant/g
(Assignee)

Comment 14

17 years ago
Nisheeth and I went thro' the patch and we're not completely comfortable with 
it. Will work on it.
Status: NEW → ASSIGNED

Comment 15

17 years ago
The fix is correct. It passes on the same state that we'd get through other
codepaths when the stream has ended. I've asked Harish to run the XML test suite
and also see whether we hit this case while loading up chrome. I do have
reservations about its importance for rtm, but if it precludes us from showing
well-formedness errors at all for most XML files, it should be fixed.

sr=vidur
(Assignee)

Updated

17 years ago
Whiteboard: [rtm need info] NEEDS R=, NEED SR= → [rtm need info] NEEDS R=, sr=vidur

Comment 16

17 years ago
r=nisheeth.  Marking rtm+.  This is important because it prevents us from
displaying an XML error for certain classes of non well formed XML pages.  One
of the major design goals of XML is to avoid the proliferation of erroneous XML
content on the web by ensuring that every XML processor rejects such content
outright.  We will be doing the web and the XML community a disservice if we
don't fix this bug.  Please accept Harish's patch.
Whiteboard: [rtm need info] NEEDS R=, sr=vidur → [rtm+] NEEDS R=, sr=vidur

Comment 17

17 years ago
Updating status whiteboard.
Whiteboard: [rtm+] NEEDS R=, sr=vidur → [rtm+] R=nisheeth, sr=vidur

Comment 18

17 years ago
rtm-, not ship stopper.
Whiteboard: [rtm+] R=nisheeth, sr=vidur → [rtm-] R=nisheeth, sr=vidur
(Assignee)

Updated

17 years ago
Whiteboard: [rtm-] R=nisheeth, sr=vidur → [rtm-][fix in hand]R=nisheeth, sr=vidur
Target Milestone: --- → mozilla0.8
(Assignee)

Comment 19

17 years ago
Fix landed. Marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 20

17 years ago
Fixed in the Feb 26th build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.