Closed
Bug 57999
Opened 24 years ago
Closed 24 years ago
XML that is NOT well formed is displayed when a certain stylesheet is applied.
Categories
(Core :: XML, defect, P3)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla0.8
People
(Reporter: chrispetersen, Assigned: harishd)
Details
(Whiteboard: [rtm-][fix in hand]R=nisheeth, sr=vidur)
Attachments
(3 files)
160 bytes,
text/xml
|
Details | |
211 bytes,
text/css
|
Details | |
645 bytes,
patch
|
Details | Diff | Splinter Review |
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•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 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•24 years ago
|
||
Basically, the xml document must not be well-formed and have a stylesheet applied to reproduce this bug.
Reporter | ||
Comment 6•24 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•24 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•24 years ago
|
||
Marking this rtm need info. About to look at it.
Status: NEW → ASSIGNED
Whiteboard: [rtm need info]
Comment 10•24 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•24 years ago
|
||
Comment 12•24 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•24 years ago
|
||
umm /s/important/apparant/g
Assignee | ||
Comment 14•24 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•24 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
Whiteboard: [rtm need info] NEEDS R=, NEED SR= → [rtm need info] NEEDS R=, sr=vidur
Comment 16•24 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•24 years ago
|
||
Updating status whiteboard.
Whiteboard: [rtm+] NEEDS R=, sr=vidur → [rtm+] R=nisheeth, sr=vidur
Comment 18•24 years ago
|
||
rtm-, not ship stopper.
Whiteboard: [rtm+] R=nisheeth, sr=vidur → [rtm-] R=nisheeth, sr=vidur
Whiteboard: [rtm-] R=nisheeth, sr=vidur → [rtm-][fix in hand]R=nisheeth, sr=vidur
Target Milestone: --- → mozilla0.8
Assignee | ||
Comment 19•24 years ago
|
||
Fix landed. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•