XML Validation page

Validation ensures that the structure and content of the XML file matches the specifications given by the DTD or schema. Use the validation page to specify schemas and DTDs to use for validation, and to specify when validation is done (during the file detection stage, or when the translator requests it).

OptionDescription
Perform schema and DTD validation during file detection

This option validates the XML file during the file detection phase.

Perform schema validation when verifying translation

This option validates the XML file when the user verifies the file from the Editor.

Manually specify schema

If selected the manually specified schema or schemas will override schemas referenced in the file.

If you also specify Use for all XML documents, you need to manually specify a schema ('master schema').

Master Schemas

Add the schemas here. If a master schema has dependent schemas, enter those in the Dependency Schemas and DTDs dialog.

Dependency Schemas and DTDs

Add schemas that are referenced from a master schema, and DTDs.

When you specify a DTD, note the following points:

  • Any locally defined DTD must be in the same directory as the document.
  • Clear the Manually specify schema box. If you select this box, the software will not search for DTDs referenced from the file. (It will only search for dependents of master schemas.)

Examples of DTD and schema references

OptionDescription
Externally referenced DTD

<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" task.dtd">

Externally referenced schema

<example xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="examples.xsd">

DTD reference

"task.dtd"

Example of an invalid reference

This is invalid: dtd/task.dtd.

A non-external DTD document must be in the same directory as the XML file that is validated.