XML Validation page

Validation ensures that the structure and content of the XML document 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).

Perform schema and DTD validation during file detection
Validates the XML document during the file detection phase.
Note: If you also select Treat all validation warnings as file parsing errors, and there are any validation warnings, StudioStudio will not open the file.
Perform schema validation when verifying translation
Validates the XML document when the user verifies the document from the Editor.
Manually specify schema
If selected the manually specified schema or schemas will override schemas referenced in the document.

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 box.
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 document. (It will only search for dependents of master schemas.)

Examples of DTD and Schema References

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.