## Test Suite Index

This page lists a few test documents and test scenarios for the W3C Markup Validator make sure everything works fine after making changes to the validator. If you can think of interesting test cases that aren't on this page, let us know.

This test suite is work in progress. Please submit any issue or idea to the public mailing-list public-qa-dev@w3.org

do not edit this page, it is automatically generated from the validator's automated test suite. If you want to add tests, edit the test suite's catalog instead.

### Valid Documents

#### Document types support

##### HTML 2.0 Document Type support test

validate - with v.w.o - view: Valid HTML 2.0 sample document.

##### HTML 2.0 Document Type support test

validate - with v.w.o - view: Valid HTML 2.0 Strict sample document.

##### HTML 4.0 Document Type support test

validate - with v.w.o - view: Valid HTML 4.0 Strict sample document.

##### HTML 4.0 Transitional Document Type support test

validate - with v.w.o - view: Valid HTML 4.0 Transitional sample document.

##### HTML 4.0 Frameset Document Type support test

validate - with v.w.o - view: Valid HTML 4.0 Frameset sample document.

##### HTML 4.01 Strict Document Type support test

validate - with v.w.o - view: Valid HTML 4.01 Strict sample document.

##### HTML 4.01 Transitional Document Type support test

validate - with v.w.o - view: Valid HTML 4.01 Transitional sample document - (from the HTML 4.01 PR)

##### HTML 4.01 Transitional (w/ iframe) Document Type support test

validate - with v.w.o - view: Valid HTML 4.01 Transitional sample document. - with iframe element (test for

##### HTML5 support test

validate - with v.w.o - view: HTML5 sample document.

##### ISO-HTML Document Type support test

validate - with v.w.o - view: Valid ISO-HTML (aka ISO/IEC 15445:2000) sample document.

##### XHTML 1.0 Strict Document Type support test

validate - with v.w.o - view: Valid XHTML 1.0 Strict sample document

##### XHTML 1.0 Strict Document Type support test

validate - with v.w.o - view: Valid XHTML 1.0 Strict (from XHTML Spec) sample document.

##### XHTML Basic 1.0 Document Type support test

validate - with v.w.o - view: Valid XHTML Basic 1.0 sample document.

##### XHTML Basic 1.1 Document Type support test

validate - with v.w.o - view: Valid XHTML Basic 1.1 sample document.

##### XHTML Basic 1.1 (revised) Document Type support test

validate - with v.w.o - view: W3C home page as XHTML 1.1 Basic. Should be valid but may not validate with the old REC versions of the DTD (would not like the class and style attributes)

##### XHTML MP 1.2 Document Type support test

validate - with v.w.o - view: XHTML MP 1.2

##### XHTML 1.1 Document Type support test

validate - with v.w.o - view: XHTML 1.1

##### XHTML+MathML2 Document Type support test

validate - with v.w.o - view: Valid XHTML/MathML2 sample document (with FPI)

##### MathML 2.0 Document Type support test

validate - with v.w.o - view: Valid MathML 2.0 minimal test document

##### XHTML 1.1 (as application/xhtml+xml) Document Type support test

validate - with v.w.o - view: Valid XHTML 1.1 sample document, served as application/xhtml+xml

##### SMIL 1.0 Document Type support test

validate - with v.w.o - view: Valid SMIL 1.0 minimal document

##### SMIL 2.0 Document Type support test

validate - with v.w.o - view: Valid SMIL 2.0 sample document.

##### SMIL 2.1 Document Type support test

validate - with v.w.o - view: Valid SMIL 2.1 sample document.

##### SMIL 2.1 Mobile Document Type support test

validate - with v.w.o - view: Valid SMIL 2.1 Mobile sample document.

##### XHTML + MathML + SVG Document Type support test

validate - with v.w.o - view: Valid XHTML + MathML + SVG sample document (from the 9 August 2002 WD)

##### XHTML Print 1.0 Document Type support test

validate - with v.w.o - view: Valid XHTML-Print sample document.

##### SVG 1.0 Document Type support test

validate - with v.w.o - view: Valid SVG 1.0 Rec. minimal document

##### SVG 1.0 Document Type support test

validate - with v.w.o - view: Valid SVG 1.1 Rec. minimal document

##### SVG 1.1 Tiny Document Type support test

validate - with v.w.o - view: Valid SVG Tiny 1.1 sample document.

##### XHTML + RDFa Document Type support test

validate - with v.w.o - view: Valid XHTML + RDFa sample document.

#### Document types outside the main catalogue

##### HTML4.0 plus blink (Custom DTD) Type support test

validate - with v.w.o - view: HTML4.0 plus blink ("Custom" SGML DTD)

##### RDDL (with FPI) Document Type support test

validate - with v.w.o - view: RDDL (with FPI)

##### RDDL (SI only) Document Type support test

validate - with v.w.o - view: RDDL (no FPI)

##### MusicXML Document Type support test

validate - with v.w.o - view: sample MusicXML, a non-catalogued XML based document type. (also test for

#### Valid Doctypeless Documents

##### (control) test for validation of SVG 1.0 with Doctype

validate - with v.w.o - view: Valid SVG 1.0, using a DOCTYPE

##### Test for validation of Doctype-less SVG 1.0

validate - with v.w.o - view: Valid SVG 1.0, but no declared DOCTYPE. Version attribute present for auto-detection

##### (control) test for validation of SVG 1.1 with Doctype

validate - with v.w.o - view: Valid SVG 1.1, using a DOCTYPE

##### Test for validation of Doctype-less SVG 1.1

validate - with v.w.o - view: Valid SVG 1.1, no declared DOCTYPE. Version attribute present for auto-detection.

##### (control) test for validation of SVG 1.1 Basic with Doctype

validate - with v.w.o - view: Valid SVG Basic 1.1, using a DOCTYPE (test currently fails because of issues in the DTD)

##### Test for validation of Doctype-less SVG 1.1 Basic

validate - with v.w.o - view: Valid SVG Basic 1.1, no declared DOCTYPE. Version and baseProfile attributes present for auto-detection. (test currently fails because of issues in the DTD)

##### (control) test for validation of SVG 1.1 Tiny with Doctype

validate - with v.w.o - view: Valid SVG Tiny 1.1, using a DOCTYPE

##### Test for validation of Doctype-less SVG 1.1 Tiny

validate - with v.w.o - view: Valid SVG Tiny 1.1, no declared DOCTYPE. Version and baseProfile attributes present for auto-detection.

##### Test for validation of SVG 1.1 without a version attribute, but with a DOCTYPE

validate - with v.w.o - view: Valid SVG 1.1, using a DOCTYPE. No version attribute (optional). Should use info given by doctype.

##### Test for validation of SVG 1.0 without a version attribute, but with a DOCTYPE

validate - with v.w.o - view: Valid SVG 1.0, using a DOCTYPE. No version attribute (optional). Should use info given by doctype.

##### Test for validation of SVG with neither a version attribute nor DOCTYPE

validate - with v.w.o - view: SVG with neither DOCTYPE nor version attribute. The validator may use a default.

#### Valid Documents, with Warnings

##### Test document with reference to a non-existing ID

validate - with v.w.o - view: Reference to a non-existing ID (opensp message type X, See

##### Test for warnings about non-SGML character(s)

validate - with v.w.o - view: Non-SGML Chars

##### Test for warning about ampersand as data (in SGML)

validate - with v.w.o - view: HTML 4.01 Document with Ampersand as data

##### Test for warning in case of ambiguous parse mode

validate - with v.w.o - view: document served as

##### Test of warning in case of FPI/SI doctype mismatch (XHTML1)

validate - with v.w.o - view: FPI/SI doctype declaration mismatch (system Id refers to a 404)

##### Test of warning in case of FPI/SI doctype mismatch (HTML4)

validate - with v.w.o - view: FPI/SI doctype declaration mismatch (html 4 doc with system Id refers to xhtml)

##### Test of warning in case of FPI case mismatch in doctype

validate - with v.w.o - view: FPI/SI doctype declaration mismatch (system Id is OK but FPI has wrong case)

##### Test of warning for the usage of shorttag constructs

validate - with v.w.o - view: sample HTML 4 document using the (valid, but problematic) shorttags features

##### Test for warning output from HTML5 parser

validate - with v.w.o - view: sample HTML5 document using a construct that should pass checking, with a warning output.

#### Valid XHTML 1.0 documents not conforming to HTML compatibility Guidelines

##### Test of warning for non-HTML compatible XHTML document (C1)

validate - with v.w.o - view: C1: XML Declaration

##### Test of warning for non-HTML compatible XHTML document (C2)

validate - with v.w.o - view: C2: empty elements and minimized form

##### Test of warning for non-HTML compatible XHTML document (C3)

validate - with v.w.o - view: C3: Element Minimization and Empty Element Content

#### Valid Documents served with a wrong media type

##### Test of warning for HTML 4.01 served with wrong media type

validate - with v.w.o - view: HTML 4.01 Strict served with an XHTML mime type. This should fail validation since the media type forces the XML parsing mode

##### Test of warning for SVG served with wrong media type

validate - with v.w.o - view: SVG 1.0 Rec. minimal document served as text/html. This may pass validation with a warning as text/html will not trigger an unambiguous parsing mode, and doctype will prevail. (is that wrong?)

##### Test of warning for MathML served with wrong media type

validate - with v.w.o - view: MathML 2.0 as text/html This may pass validation with a warning as text/html will not trigger an unambiguous parsing mode, and doctype will prevail. (is that wrong?)

#### Bug Regression Tests: Valid documents

##### Regression test: non-unix newlines

validate - with v.w.o - view: XHTML+Math+SVG document with non-unix newlines, (See

##### Regression test: named entitles on a line with colons and numbers

validate - with v.w.o - view: XHTML with named entities on a line with colons and numbers, caused bogus error report in validator 0.8.0 (See

### Invalid Documents

#### Miscellaneous invalid docs

##### XHTML1, bogus element (foo element not in DTD)

validate - with v.w.o - view: XHTML1, bogus element (foo element not in DTD)

##### XHTML1, bogus attribute

validate - with v.w.o - view: XHTML1, bogus attribute

##### Testing fuzzy matching: typos in attribute and element, and wrong-cased attribute and element.

validate - with v.w.o - view: Testing fuzzy matching: typos in attribute and element, and wrong-cased attribute and element.

##### HTML5 document with tokenizer error (precise locator)

validate - with v.w.o - view: HTML5 document with tokenizer error (precise locator)

##### HTML5 document with Tree builder (range locator)

validate - with v.w.o - view: HTML5 document with Tree builder (range locator)

##### HTML5 document with bogus attribute (should have an error explanation)

validate - with v.w.o - view: HTML5 document with bogus attribute (should have an error explanation)

##### XHTML1, bogus element (uppercase A element not in DTD), tends to cascade errors about each attribute

validate - with v.w.o - view: XHTML1, bogus element (uppercase A element not in DTD), tends to cascade errors about each attribute

##### us-ascii xhtml document with a latin1 character

validate - with v.w.o - view: us-ascii xhtml document with a latin1 character

##### Invalid document (img without alt, invalid

validate - with v.w.o - view: Invalid document (img without alt, invalid

##### invalid frames document (noframes in forbidden location). Also test for absence of newlines

validate - with v.w.o - view: invalid frames document (noframes in forbidden location). Also test for absence of newlines

##### HTML 4.01 Strict - with iframe element (test for

validate - with v.w.o - view: HTML 4.01 Strict - with iframe element (test for

##### XHTML1, blank first line (

validate - with v.w.o - view: XHTML1, blank first line (

##### Bug

validate - with v.w.o - view: Bug

##### XHTML with bogus XML Decl, served as application/xhtml+xml (missing final "?")

validate - with v.w.o - view: XHTML with bogus XML Decl, served as application/xhtml+xml (missing final "?")

##### XHTML with bogus XML Decl, served as text/html (missing final "?")

validate - with v.w.o - view: XHTML with bogus XML Decl, served as text/html (missing final "?")

##### bogus FPI #1: lowercase "doctype".

validate - with v.w.o - view: bogus FPI #1: lowercase "doctype".

##### SMIL 2.0 with bogus xmlns and missing space between attributes

validate - with v.w.o - view: SMIL 2.0 with bogus xmlns and missing space between attributes

##### SMIL 2.0 with bogus xmlns, xml ill-formedness and bogus elements (used to test sorting of errors)

validate - with v.w.o - view: SMIL 2.0 with bogus xmlns, xml ill-formedness and bogus elements (used to test sorting of errors)

##### XHTML 1.0 missing space between attributes (

validate - with v.w.o - view: XHTML 1.0 missing space between attributes (

#### Missing Doctype

##### XHTML, no DOCTYPE, no xmlns (thus invalid)

validate - with v.w.o - view: XHTML, no DOCTYPE, no xmlns (thus invalid)

##### XHTML, no DOCTYPE, has xmlns (served as application/xhtml+xml)

validate - with v.w.o - view: XHTML, no DOCTYPE, has xmlns (served as application/xhtml+xml)

##### XHTML, no DOCTYPE, has xmlns (served as application/xhtml+xml)

validate - with v.w.o - view: XHTML, no DOCTYPE, has xmlns (served as application/xhtml+xml)

##### XML, no DOCTYPE, not well-formed (marked as "invalid XML" - FIXME should be reworded)

validate - with v.w.o - view: XML, no DOCTYPE, not well-formed (marked as "invalid XML" - FIXME should be reworded)

##### SGML-ish document without html root. Served as text/html. No DOCTYPE. Correct SGML syntax. Would pass as well-formed XML if it were XML...

validate - with v.w.o - view: SGML-ish document without html root. Served as text/html. No DOCTYPE. Correct SGML syntax. Would pass as well-formed XML if it were XML...

##### SGML-ish document without html root. Served as text/html. No DOCTYPE. Bogus SGML syntax.

validate - with v.w.o - view: SGML-ish document without html root. Served as text/html. No DOCTYPE. Bogus SGML syntax.

#### DTD-Valid but not conformant

##### XHTML 1.0 Strict missing xmlns attribute (valid)

validate - with v.w.o - view: XHTML 1.0 Strict missing xmlns attribute (valid)

#### Documents that are invalid, which the validator passes as OK

##### bogus FPI #2: HTML 4.01 "Strict"

validate - with v.w.o - view: bogus FPI #2: HTML 4.01 "Strict"

##### bogus FPI #3: XHTML 1.1 "Strict"

validate - with v.w.o - view: bogus FPI #3: XHTML 1.1 "Strict"

### Docs that should be Well Formed

#### Basic XML document, well formed. No doctype. Currently checked only for xmlwf. Passes.

validate - with v.w.o - view: Basic XML document, well formed. No doctype. Currently checked only for xmlwf. Passes.

#### XML output from OpenOffice 5.2 ("Build/Tag number OpenOffice605"), many namespaces. Currently checked only for xmlwf. Passes.

validate - with v.w.o - view: XML output from OpenOffice 5.2 ("Build/Tag number OpenOffice605"), many namespaces. Currently checked only for xmlwf. Passes.

#### Very minimal SVG document, no document type. Currently checked only for xmlwf. Passes.

validate - with v.w.o - view: Very minimal SVG document, no document type. Currently checked only for xmlwf. Passes.

#### XHTML document without doctype, served as XML. Fallback to XHTML 1.0, and invalid.

validate - with v.w.o - view: XHTML document without doctype, served as XML. Fallback to XHTML 1.0, and invalid.

### Document Encoding Tests

#### Various Encodings

##### iso-2022-jp encoded document

validate - with v.w.o - view: iso-2022-jp encoded document

##### windows-1250 encoded document (Slovenian)

validate - with v.w.o - view: windows-1250 encoded document (Slovenian)

##### utf-8 encoded document

validate - with v.w.o - view: utf-8 encoded document

##### XML file with a "Plane 20" character (bogus).

validate - with v.w.o - view: XML file with a "Plane 20" character (bogus).

##### Charset mismatch: HTTP Content-Type and XML Declaration (sends warning, proceed with HTTP and pass)

validate - with v.w.o - view: Charset mismatch: HTTP Content-Type and XML Declaration (sends warning, proceed with HTTP and pass)

##### Charset mismatch: HTTP Content-Type and meta http-equiv (sends warning, proceed with HTTP and pass)

validate - with v.w.o - view: Charset mismatch: HTTP Content-Type and meta http-equiv (sends warning, proceed with HTTP and pass)

##### iso-8859-1 HTML document with charset declared in meta, (test for

validate - with v.w.o - view: iso-8859-1 HTML document with charset declared in meta, (test for

##### iso-8859-1 HTML document with charset not declared in meta (nor in HTTP), (test for

validate - with v.w.o - view: iso-8859-1 HTML document with charset not declared in meta (nor in HTTP), (test for

##### case-sensitivity of charset parameter in meta

validate - with v.w.o - view: This is a test for

### Error conditions & strange cases

#### DOCTYPE with a relative URI for the system identifier. Should probably pass if the sgml parser was given the base URI(?)

validate - with v.w.o - view: DOCTYPE with a relative URI for the system identifier. Should probably pass if the sgml parser was given the base URI(?)

### Test for specific output

#### Output of preparse warnings

##### text/xml, no charset (W01)

validate - with v.w.o - view: text/xml, no charset (W01)

##### text/html, no charset, fbc set (W02)

validate - with v.w.o - view: text/html, no charset, fbc set (W02)

##### charset override (W03)

validate - with v.w.o - view: charset override (W03)

##### text/html, no charset, override set (W04)

validate - with v.w.o - view: text/html, no charset, override set (W04)

##### text/html, no charset (W04)

validate - with v.w.o - view: text/html, no charset (W04)

##### XHTML, no DOCTYPE, if overriden, should output W05.

validate - with v.w.o - view: XHTML, no DOCTYPE, if overriden, should output W05.

##### HTML4.0 plus blink ("Custom" SGML DTD), parse mode fallback to SGML (W06)

validate - with v.w.o - view: HTML4.0 plus blink ("Custom" SGML DTD), parse mode fallback to SGML (W06)

##### HTML 4.01 Strict served with an XHTML mime type. Parse mode conflict (W07)

validate - with v.w.o - view: HTML 4.01 Strict served with an XHTML mime type. Parse mode conflict (W07)

##### XHTML, no DOCTYPE, no xmlns (thus invalid). (W09).

validate - with v.w.o - view: XHTML, no DOCTYPE, no xmlns (thus invalid). (W09).

##### XML, no DOCTYPE, not well-formed (W09xml)

validate - with v.w.o - view: XML, no DOCTYPE, not well-formed (W09xml)

##### XHTML. If using doctype override to HTML401, namespace will trigger (W11)

validate - with v.w.o - view: XHTML. If using doctype override to HTML401, namespace will trigger (W11)

##### Test for xmlns in HTML content

validate - with v.w.o - view: HTML 4.01 with xmlns attribute on root element. Should trigger a validation error (it does) and preparse warning W11 (it doesn't!)

##### HTML 4.01 Strict, validated with HTML 4.01 Transitional override (W13)

validate - with v.w.o - view: HTML 4.01 Strict, validated with HTML 4.01 Transitional override (W13)

##### No doctype, override given, fallback fbd is off (W15)

validate - with v.w.o - view: No doctype, override given, fallback fbd is off (W15)

##### No doctype, fallback given (W16)

validate - with v.w.o - view: No doctype, fallback given (W16)

##### charset mismatch HTTP / XML decl (W18)

validate - with v.w.o - view: charset mismatch HTTP / XML decl (W18)

##### charset mismatch HTTP / Meta (W19)

validate - with v.w.o - view: charset mismatch HTTP / Meta (W19)

##### MathML 2.0 as text/html (W23)

validate - with v.w.o - view: MathML 2.0 as text/html (W23)

##### supported, but rare, charset (W24)

validate - with v.w.o - view: supported, but rare, charset (W24)

##### SVG with neither DOCTYPE nor version attribute (OK in SVG). (W25)

validate - with v.w.o - view: SVG with neither DOCTYPE nor version attribute (OK in SVG). (W25)

### Non-Automated tests

The following test collections are not managed by the automated test suite, and should be tested by hand on a regular basis

#### User Interface tests

The following tests do not test the binary "validity" results, but the proper handling of options, errors, various outputs, etc. "validate" links use this instance, with validator.w3.org links added for reference comparison

- validate - with v.w.o - a file: URL
- validate - with v.w.o - /check/referer (deprecated)
- validate - with v.w.o - /check/referer;verbose=1 (unsupported)
- validate - with v.w.o - /check/referer;verbose=1;No200=1 (unsupported)
- validate - with v.w.o - /check?uri=referer (supported, should validate this test collection)
- validate - with v.w.o - /check?uri=referer;verbose=1 (supported, should validate this test collection)
- validate - with v.w.o - /check?uri=referer&verbose=1 (supported, should validate this test collection)
- validate - with v.w.o - /check?uri=referer;verbose=1;No200=1 (supported, should validate this test collection)
- validate - with v.w.o - Directory Redirect (should mention the redirect and validate the redirection target
- validate - with v.w.o - script invoked with no parameters (gives an error)
- validate - with v.w.o - uri parameter is empty
- validate - with v.w.o - uri is missing http:// (silent fix)
- validate - with v.w.o - 404 not found
- validate - with v.w.o - 404 not found, with "validate error pages" ON
- validate - with v.w.o - text/plain resource (refuses to validate)
- validate - with v.w.o - httpd on a non-standard port (should be working transparently if :8000 server is running)
- validate - with v.w.o - a resource served as application/atom+xml, should be passed on to the Feed Validator.
- validate - with v.w.o - a resource served as text/css, should be passed on to the CSS Validator.

#### Bugs and Regression Tests

These should be tied to a bug report on either mailing-list and/or bugzilla whenever possible.

- Long Lines (cause a core)
- A trailing ASCII NUL character (trips up HTML::Parser (not really))
- Undeclared namespace prefixes (colons ":" in element names (trips up parsing of onsgmls output))
- validate - with v.w.o - view: Test of doctype override for SVG document with no doctype, but an XML decl. The doctype should sneak between the XML decl and the root svg start tag. ( 857 - DOCTYPE Override)