Home Forums General XMetaL Discussion Turn off rule checking in normal view and tags on view Reply To: Turn off rule checking in normal view and tags on view

Derek Read

Reply to: Turn off rule checking in normal view and tags on view

There is an API that lets you turn RulesChecking on and off. See the Programmer's Guide: http://na.justsystems.com/webhelp/en/xmetaldeveloper/pg/6.0/pg.html#RulesChecking

So, for whatever reason you want to save invalid documents? If that is the case, there are other options. You could override the Save and Save As functions and then perform your own save using script (some of our clients have done this to save content directly to a database, which is different from your need but the solution may be similar).

There is an INI variable that turns off validation during saving. Perhaps that might do it. This information is in the Customization Guide:

validate_before_export = yes/no (default is yes)
= Validate a file before any action that causes the file to be saved.

There are also some INI variables that let you control whether Rules Checking is on, and also allow the user to toggle it on and off through the Tools > Options dialog. These are also listed in the Customization Guide:

rules_checking_always_off = yes/no (default is no)
= When set to YES, XMetaL does not validate a document during editing (it will still validate upon saving however, to turn that off use the INI setting listed above).

rules_checking_always_off_option_shown = yes/no (default is no)
= When set to true this displays the rules checking option in the Tools > Options dialog.

The difference between these last two and the API is that the API acts on the ActiveDocument whereas these settings affect the application (all documents).