General XMetaL Discussion
chandan7891 November 26, 2010 at 5:52 am
Turn off rule checking in normal view and tags on viewNovember 26, 2010 at 5:52 amParticipants 0Replies 1Last Activity 12 years, 2 months ago
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 November 26, 2010 at 6:58 pm
Reply to: Turn off rule checking in normal view and tags on viewNovember 26, 2010 at 6:58 pm
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).
- You must be logged in to reply to this topic.