Index of /tests/evil/xml
      Name                    Last modified      Size  Description
      Parent Directory                             -   
      mozilla/                2002-07-03 14:33    -   
      001.html                2002-09-15 08:17  1.7K  Evil XML: Script Access to Secondary XML Windows (HTML version)
      001.xml                 2002-11-26 10:00  2.0K  
      001b.css                2001-06-14 17:35  121   
      001b.xml                2001-06-14 17:37    7   
      002.xml                 2001-06-14 19:01  362   
      002a.xml                2002-10-22 19:28  1.4K  
      002b.css                2001-06-14 22:09  121   
      002b.xml                2001-06-14 18:57    7   
      003.html                2002-11-21 00:18  385   Evil XML: Dumping the DOM of an XML frame
      003a.html               2002-11-21 00:13  4.0K  Evil XML: Dumping the DOM of an XML frame (inner frame)
      003b.xml                2001-06-14 23:35   57   
      004.html                2001-06-15 00:04  376   Evil XML: Dumping the DOM of an XML frame
      004b.css                2001-06-15 00:21   66   
      004b.xml                2001-06-15 00:04  108   
      005.css                 2002-07-03 13:57   27   
      005.xml                 2002-07-03 14:04  135   
      006.css                 2002-07-03 13:57   27   
      006.xml                 2002-09-15 08:24  155   
      007.css                 2002-07-03 14:02   27   
      007.xml                 2002-07-03 14:03  185   
      008.xml                 2002-07-03 14:03  454   
      009.xml                 2002-07-03 14:06  266   
      009b.xml                2002-07-03 14:07  222   
      010.xml                 2002-07-03 14:29  631   
      010b.css                2002-07-03 14:19   22   
      010b.xml                2002-07-03 14:08    7   
      011.xml                 2005-06-08 08:01  717   
If an XML document has no author stylesheet [1] no author script [2]
and contains no elements or attributes in namespaces given in ua.css
[3], then a UA could display the following in the content area:
    ____
   |    L\  This XML file does not appear to have any style information
   |<xml>|  associated with it. 
   |     |
   |_____|  [ View document without style ]  [ View source ]
While that is shown, it has to listen for mutation events, in order to
automatically switch to the document view if any of the conditions
listed above stop applying (e.g., a stylesheet PI is added to the
document). If the user clicks [ View source ], then it doesn't have to
worry about monitoring the source. If the user clicks the first
button, then again it doesn't need to worry.
Footnotes:
[1] There are various ways to add author stylesheets: style attributes
in various namespaces, style elements in various namespaces, various
different link elements in various namespaces, HTTP headers, some
presentational attributes on elements in certain namespaces, etc. For
example, one way to add styles is to dynamically bind the root element
to an XBL binding that links to a CSS stylesheet.
[2] Similarly, scripts can be added in many different ways. The XBL
case is possible here too, but that's not the only way. Adding event
handlers via the DOM is another possibility. Some elements and
attributes in various namespaces add script to the document, etc.
[3] The contents of the UA stylesheet file can change depending on the
build options and, in some UAs, user modifications at run time. For
example, MathML in Mozilla is sometimes supported and sometimes not,
and, in Mozilla, all links (XLink included) are styled by html.css.
See Bugzilla bug 64945.