Improving XML error pages (YSOD)
[email protected] Sat, 22 Mar 2008 06:48:00 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <b9d9521b-8ffb-4824-84f3-3034ee64d463@c19g2000prf.googlegroups.com> |
Hi all, I thought I might have a look at bug 418305 (Make Yellow-Screen-Of- Death More Informative). My first effort was going to be to make the error page look a bit more like the new network error pages. Currently the YSOD page is produced in nsXMLContentSink which creates a page with a "<parsererror>" root element. This is relied on by other code and extensions so I guess it should stay the same. I tried adding a processing instruction into the parsererror document, transforming it into a error page with XSLT, but I got an error saying that the stylesheet couldn't be loaded. Then I thought I might be able to use an nsIContentSniffer to detect the "<parsererror>", but the content sniffer sees the original XML page, not the error page. Any ideas on better ways to do this? I could just enhance nsXMLContentSink to produce a more complex page, but it might be better to leave that interface only for backwards-compatibility. Matthew