## Markup Validator's test collection

### Table of contents

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.

### Document types support

Below is a list of sample documents for a number of document types the validator is supposed to be supporting. The first validate link will attempt validation with the current instance, for test purposes. The v.w.o instance can be taken as reference/comparison.

- validate - with v.w.o - view: HTML 2.0
- validate - with v.w.o - view: HTML 2.0 Strict
- validate - with v.w.o - view: HTML 4.0 Strict
- validate - with v.w.o - view: HTML 4.0 Transitional
- validate - with v.w.o - view: HTML 4.0 Frameset
- validate - with v.w.o - view: HTML 4.01 Transitional - (from the HTML 4.01 PR)
- validate - with v.w.o - view: ISO-HTML (aka ISO/IEC 15445:2000)
- validate - with v.w.o - view: XHTML 1.0 Strict
  validate - with v.w.o - view: XHTML 1.0 Strict (from XHTML Spec)
- validate - with v.w.o - view: XHTML Basic 1.0
- validate - with v.w.o - view: XHTML 1.1
- validate - with v.w.o - view: XHTML/MathML2 (with FPI)
- validate - with v.w.o - view: MathML 2.0 (minimal test document)
- validate - with v.w.o - view: XHTML 1.1 served as application/xhtml+xml
- validate - with v.w.o - view: SMIL 1.0 minimal document
- validate - with v.w.o - view: SMIL 2.0
- validate - with v.w.o - view: XHTML + MathML + SVG (from the 9 August 2002 WD)

#### Document types outside the main catalogue

Below is a number of other types of documents that the validator does not have in its "hardcoded" catalogue, but should support anyway. All these documents should validate, without "pretty print" for the document type

- validate - with v.w.o - view: HTML4.0 plus blink ("Custom" SGML DTD)
- validate - with v.w.o - view: RDDL (with FPI)
- validate - with v.w.o - view: RDDL (no FPI)
- validate - with v.w.o - view: XHTML-Print (not yet a REC)

### Docs that are probably invalid

we must FIX THIS! It's not reliable any more...

- Yahoo!
- Microsoft
- Netscape
- XML 1.0

### Docs that should be Well Formed

- XHTML sans DOCTYPE (DanC's HTMLized RFC 2616;well-formed, but not valid!)
- XHTML/MathML2 (from the MathML 2.0 spec)
- XML output from OpenOffice 5.2 ("Build/Tag number OpenOffice605"), many namespaces

### Various Encodings

- UTF-8 sample text (correct), more positive tests
- UTF-8 stress test (wrong cases), more negative tests
- iso-2022-jp encoded document
- windows-1250 encoded document (Slovenian)
- utf-8 encoded document
- XML file with a "Plane 20" character (bogus).

### Error conditions & strange cases

This should be split in UI testing and regression tests

- XHTML, no DOCTYPE, no xmlns (invalid)
- bogus FPI #1: lowercase "doctype".
- bogus FPI #2: HTML 4.01 "Strict"
- bogus FPI #3: XHTML 1.1 "Strict"
- bogus XML Decl (missing final "?")
- XHTML1, blank first line (should be marked as invalid)
- XHTML1, bogus element
- us-ascii xml document with a latin1 character (should be invalid)
- no newlines
- a file: URL
- Non-SGML Chars.
- SHORTTAGS and -wunclosed..
- image/svg
- SVG 1.0 Rec. minimal document
- xmlconf-19990712.xml

### 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 - /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=refererr&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)

### Bugs and Regression Tests

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

- validate - with v.w.o - view: Bug 798: Ampersand as data in XHTML (also good as a test for warnings in otherwise valid result)
- 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))

### Mixed bag

Don't know where to put these yet

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

## Other Test Suites

- NIST's XML, DOM test suites