Validator

from Wikipedia, the free encyclopedia

A validator is a computer program that checks the syntactic correctness of a document. The term is often used with reference to markup languages. Specific validators can, for example, check the syntax of HTML documents or the conformity of an XML document with an XML schema .

Types of validators

There are basically two types of validators:

  • Validators for a standard (e.g. HTML validator)
  • Validators that are controlled by a schema

In the case of XML, a distinction is made between the two types of validation. In the first case (test against the XML standard) one speaks of well-formedness and in the second case (test against a schema) of validation.

In practice, a validator should not only recognize if a document is not valid, i.e. does not conform to a standard or scheme, but should also point out possible causes. Validators can also be used to only point out possible errors, for example in the case of an automatic spell check . As this example shows, it can also happen that a validator does not cover the full standard (here: the rules of the German language), but only detects a few errors.

See also

Web links