Home Forums General XMetaL Discussion Validation Schema and XInlcude and validation in general Reply To: Validation Schema and XInlcude and validation in general

Derek Read

Reply to: Validation Schema and XInlcude and validation in general

Regarding your processing instruction question…

The answer is that out of the box there is no way to do this (no way to “add a value to a config file” or similar setting) but it might be possible with customization (requiring scripting).

XMetaL Author locates a DTD using the DOCTYPE declaration's SYSTEM and PUBLIC id values as specified in the XML file. For Schema it uses the schemaLocation and noNamespaceSchemaLocation attributes.

If a DTD is not located at the location specified by the SYSTEM id then XMetaL checks its catalog files for matches on the PUBLIC id value. Failing to find a match there XMetaL checks in the AuthorRules folder (by default) and failing to find a DTD there the user is then prompted to browse for it.

However, at the time the SYSTEM id value is being checked it is possible to intercept that value and alter it using script (there's an event for that) and several APIs to override values (for SYSTEM and PUBLIC id) that will ultimately be used. We would want to know more about why your documents might not contain a DOCTYPE declaration or schemaLocation path in order to answer whether these APIs would be appropriate for your particular situation and possibly additional information as well. Most of the time it just makes sense for an XML document to reference the proper DTD or Schema (in order to be compatible with not just our software but all other XML processors). It might be best to contact XMetaL Support directly or have our sales team put you in touch with our Professional Services team in this case (they specialize in creating custom solutions for clients).