The W3C suggests in the URL-referenced document that embedded stylesheets can be referenced by an XML ID-type attribute. Although technically the above is not part of any W3C Recommendation, the document implies it should be considered as part of or an amendment to CSS2 (at the top of the page). http://www.w3.org/Style/Examples/002/doc.xml is a testcase they were kind enough to provide. Currently, Mozilla gives us an exception for that behavior: Error: The stylesheet http://www.w3.org/Style/Examples/002/doc.xml#style was not loaded because its MIME type, "text/xml", is not "text/css". This bug may be a duplicate, but heikki and I could not find another bug filed for this issue.
14 years ago
All I have to say is "eh". ;) We _could_ add support for this via the XML sink; it'd have to notice such PIs and stash them away or something and then when the element with the matching ID comes along it could kick off the sheet load.... More interestingly, the example being cited is totally broken because the sheet is not inside a CDATA section and will thus get parsed into real text nodes (and worse yet, '<' and '>' chars in it will be parsed). I have a gut feeling that as currently presented that example is a really bad idea.....
Heikki commented on the dupe. :-) *** This bug has been marked as a duplicate of 61675 ***