Pages: 1
Author Topic: Turn off rule checking in normal view and tags on view  (Read 3198 times)

Posts: 23

« on: November 25, 2010, 11:52:33 PM »

hi sorry i know i am asking too much of question....
but one thing i wanted to know is that can we write any macro so that before saveing the xml
it will not check ither the xml is valid or not and it simplly save the xml without performed the rule checking.........

any help in it is really important........
Derek Read
Program Manager (XMetaL)

Posts: 2580

« Reply #1 on: November 26, 2010, 12:58:58 PM »

There is an API that lets you turn RulesChecking on and off. See the Programmer's Guide:

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).
« Last Edit: December 16, 2010, 04:55:48 AM by Derek Read » Logged
Pages: 1
Jump to: