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).
| Option | Description |
|---|---|
| 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:
|
Examples of DTD and schema references
| Option | Description |
|---|---|
| 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 |
|
| Example of an invalid reference | This is invalid: A non-external DTD document must be in the same directory as the XML file that is validated. |