This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I got a problem with the W3C CSS Validator while trying to validate a document (written in XHTML 1.0 Strict, served as application/xhtml+xml, encoding UTF-8, validated by W3C Validator) in wich the stylesheet is referenced with a XML processing instruction as follows: <?xml-stylesheet alternate="no" href="URI" type="text/css" media="all" ?> Since Firefox is cappable of this notation, the CSS Validator says "No Errors or Warnings found. No Stylesheet found." and validates nothing at all. The validation only works (and is successful), if I additionally include a reference with the link element as follows: <link rel="stylesheet" href="URI" type="text/css" media="all" /> Occurs on any Platform/OS/UA, direct and with referer-link, used browsers are Firefox 2.0.0.9 and IE 7.0 (itself not cappable of XHTML, but doesn't change the failded validation). To reproduce the error/failing, try to get a validation with: http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.djg-muenchen.de%2F (Page in german language, but this shouln't be relevant for testing.) Best regards, Peter Neumann
Just as a side note: This problem belongs also to XHTML 1.1 documents. It seems, that the validator at the moment is unable to detect and/or handle xml processing instructions at all, if no <link> element and/or internal stylesheet is given. Seems to be related to Bug #4105 and maybe Bug #2403. (http://www.w3.org/Bugs/Public/show_bug.cgi?id=4105) (http://www.w3.org/Bugs/Public/show_bug.cgi?id=2403) Best Regards, Peter Neumann
Testlink provided in Description has changed: >> http://dark-chiaki.net/test/00048689/ (XHTML 1.0 Strict, served as 'application/xhtml+xml; charset="utf-8"') The earlier provided testpage has been rewritten to HTML 4.01 Strict, as a result no XML Stylesheet-PI will be provided for the test anymore. Best Regards, Peter Neumann
Created attachment 698 [details] Proposed patch for this issue. I also encountered this problem whilst attempting to validate a site I'm building (XHTML 1.1, application/xhtml+xml and xml-stylesheet PIs) using both the online validator, and the development version from CVS run from the command line. This patch makes the following change to the processingInstruction methods of both the TagSoupStyleSheetHandler and the XMLStyleSheetHandler classes within the org.w3c.css.css package. * The local "mt" variable is assigned the MimeType instance created from the "type" pseudo-attribute of the xml-stylesheet PI. Without this change, the validator does not see the specified URI as referencing a CSS stylesheet, and so ignores it. Best regards, William F. McCaw.
*** Bug 12632 has been marked as a duplicate of this bug. ***