Unofficial W3C CSS Validator FAQ

This is a list of frequently asked questions and answers asked on the www-validator-css@w3.org mailing list regarding the W3C CSS Validator. Please direct questions to the mailing list, not the author of this FAQ.

What does "org.xml.sax.SAXException: Please, fix your system identifier (URI) in the DOCTYPE rule." mean?

Your XHTML document contains a document type declaration but the system identifier points at some non-W3C URI. Your document probably contains something like this:

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "DTD/xhtml1-strict.dtd">

If your document is located at e.g. http://my.example/ this relative system identifier would point at http://my.example/DTD/xhtml1-strict.dtd and there is certainly no such DTD

So you must fix the system identifier to point at some valid URI. Consider these examples for XHTML 1.0:

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

What does "I/O Error: Unknown mime type: some/type" mean?

Cascading Style Sheets must be declared as text/css, see RFC 2318, "The text/css Media Type" for details. Your server must be configured to return this MIME type, if you don't know how to do this, refer to your webserver's manual or your system administrator or the support of your hosting company.

What does "An invalid XML character (Unicode: 0x????) was found in the element content of the document." mean?

Your XHTML documents contains characters not encoded as UTF-8 or UTF-16 and misses an encoding declaration in the XML declaration. Declare your encodings like:

<?xml version='1.0' encoding='iso-8859-1'?>

prior to your document type declaration, or encode the document with UTF-8 (e.g. by using named entities like &ouml; for 'ö')

Where can I download the Validator?

Please refer to the announcement by Philippe Le Hegaret. Philippe writes:

[...]

Sources are available at:
http://www.w3.org/2001/05/05-19-cssvalidator.zip

Don't download it if you're not willing to spend time to compile
it. Makefile are deprecated, no configure script and other
helpful stuffs. javac **/*java must work.
You'll need sax and xerces to compile it. 
Some of these sources are 4 years old and were also used for testing
(XML/CSS format, SVG, ATSC, CSS3, ...). Well, Sitschje managed to
understand them so I guess it's not so bad.

[...]

Copyright © 2001, Björn Höhrmann <bjoern@hoehrmann.de>.