Reply to: Validating CALS tablesMay 3, 2018 at 7:23 pm
I'll see if we can have someone look at that Schematron. Most likely it is simply incompatible with the Schematron engine we are using or the XSLT2 parser it runs on. Adjusting the file may be possible.
We should clarify what you mean by “validation” before answering your next question. Schematron is a language that allows you to make assertions about the presence or absence of specific patterns (whether nodes are present or not) in XML. This is different from the standard XML validation rules.
XMetaL Author is a “validating XML parser” and implements the standard validation rules according to the W3C's XML Recommendation. This feature is “live” at all times.
The best way to validate any XML document in XMetaL Author is to simply open the XML file. As long as it references a DTD or W3C Schema (aka: schema) the XML file will be validated immediately after the schema has been loaded. The same is true when you save — validation is performed before the file is written out. You can also force validation to run at any time by selecting Validate from the Tools menu.
While editing an XML file another (proprietary) feature related to validation is engaged that we call “Rules Checking”. This feature attempts to keep the document valid by not letting you put it into an invalid state when using the Element List, Attribute Inspector, via paste, etc. What this means is that if you start editing a valid document XMetaL will keep that document valid no matter what changes you make to it until you save.*
You can read more about the Validation and Rules Checking features in the help topic “Validation and rules checking”.
* Note that this is not entirely true (though it is 99% of the time). XMetaL Author allows you to put a document into an invalid state in order to let you get to another valid state. One example is when an element must contain one (and only one) of multiple child elements and it already contains one of them. If you wish to insert a different child element XMetaL Author allows you to remove the existing child (putting the document into an invalid state) so you can insert one of the other allowed children. The majority of the cases will be similar, with XMetaL Author allowing you to delete things from a document putting it into a state where a required node might be missing. This is where validation comes in and that is why it is performed at file open and at file save.