<?xml-stylesheet href="001-xml.css"?>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>DOM CSS: Rules</title>
  <link href="001-link.css" rel="stylesheet"/>
  <style type="text/css">
   @import url(001-import.css);
  </style>
  <style type="text/css">
   /* 001-style.css */
   rule { color: green; }
   @font-face { color: green; }
   @import "001.css";
   @page { color: green; }
   @media screen { color: green; }
  </style>
 </head>
 <body id="body">

  <h1>THIS TEST CASE IS INCOMPLETE BECAUSE I AM BLOCKED ON GETTING A RELIABLE STYLESHEETS ARRAY</h1>

  <script type="text/javascript">
   <![CDATA[
     with (document) {
       getElementById('body').
       appendChild(createElementNS('http://www.w3.org/1999/xhtml', 'div')).
       appendChild(document.createTextNode(document.styleSheets.length)).data +=
         ' should be 5, because there are five top level stylesheets linked to this document (through an HTTP header, an XML PI, an XHTML link element, and two XHTML style elements).';
     }
   ]]>
  </script>

 </body>
</html>
