STG Logo Scholarly Technology Group

XML Validation Form

To validate a small XML document, just paste it into the text field below and hit the validate button. If the document is too large to be conveniently pasted into the text field, enter its filename into the local file field. You may also validate an arbitrary XML document on the Web by typing its URI into the URI field.

For more instructions, see below. See also the FAQ.


Local file:
 Suppress warning messages
 Relax namespace checks
  
URI:
 Suppress warning messages
 Relax namespace checks
  
Text:
 Suppress warning messages
 Relax namespace checks
  

Instructions

This interface offers full XML 1.0 validation facilities. Its only notable deviation from the 1.0 spec comes in its handling of whitespace, which it ignores inside of markup where syntactically irrelevant. Note, though, that this deviation from the spec has nothing to do with the hotly debated issue of whitespace in actual character data (in which respect this validator follows the spec).

To use this interface to validate a small XML document, paste the document in question into the text field above and click on the lower validate button.

To validate a file (e.g., something on your local hard drive), type that file's name into the local file field above. Then hit the upper validate button. If your file isn't encoded as UTF-8, make sure that it has an XML declaration (if it is encoded as ISO-8859-x, make sure it has an encoding declaration as well).

To validate an arbitrary document on the Web, type its URI into the URI field above. Then click on the validate button.

Note that, in order to validate OK, a document's system identifiers must all be resolvable URIs. Dummy URIs and local paths will not resolve. Naturally, all documents must have a DOCTYPE declaration. (On the reasons why, see STG TR 1998:2.) Elements and attributes in namespaces must be declared, unless the relax namespace checks box is checked (which turns off strict validation for undeclared elements and attributes in namespaces).

Validation results are displayed as follows: If errors are found, a list of them is printed out. If any of these errors occurs in the document itself (as opposed to an external file), the document is appended, with links to the relevant error messages. If no errors are found, a "document validates OK" message is displayed, possibly accompanied by a list of warnings. All results are encoded as UTF-8.

For security reasons, if you are validating an arbitrary document on the Web (i.e., if you are validating by URI, and not by direct upload from your local machine), the original document is never fully displayed, even if errors are found.

Notes: 1) This system is only useful for documents that have a line structure conducive to human reading. 2) Some of the error links also will not work properly with Internet Explorer version 4.0 and earlier. 3) Browsers may vary widely in their ability to display UTF-encoded results. And 4) it can take a while to validate documents containing lots of external entities that must be resolved and fetched over the network.


Richard Goerwitz, STG
STG_info@Brown.EDU