cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Is is possible to force Schematron to run when "context rules" are active?

jbaldwin
4-Participant

Is is possible to force Schematron to run when "context rules" are active?

Currently, in my environment, enhanced completeness checking (which includes Schematron) only runs when the user manually runs the "cc" command or selects Completeness Check from the menu. 

 

We would like Schematron to be continuously validating the content in the Editor in real time. Another option is to "force" a Completeness Check upon save or close, but because we are using a third party CCMS with its own Arbortext ACL programming in custom/init and scripts, we feel it is too risky to rewrite the save and close aliases ourselves to force the completeness check. 

 

Unfortunately, this is necessary because some of our tech writers cannot seem to get in the habit of following process and running "cc" before checking content back in to the CCMS.

 

Any ideas? Thanks!

 

PS: We are running Arbortext Editor v6.0, but we should be on v7.1 by year end.

3 REPLIES 3

Hi Jay,

Great to hear from you and I hope all is going well over there. The default Arbortext behaviour is to ensure well-formedness and validity against a DTD or schema. The Schematron rules only run during the completeness check. If you wish to change that then you will need some sort of script. The simplest that comes to mind would be to run the "cc" check on a timer. For example every minute you could have a completeness check run. You could also hook into the save event but as you say that may interfere with your CMS.

If you want to try this out, check out the timer_add_callback() ACL function e.g.

function document_check(win)
{ 
   if (0) {
     return 0; # cancel timer
   } else {
cc; # completeness check
return 1; # keep timer
} } timer_add_callback(6000, 'document_check', doc_window()); # one minute timer

 I hope that is helpful? We do a lot of Arbortext work so do let us know if you need any help with the upgrade. Current version is 8.1.0.0.

Cheers,

Gareth

jbaldwin
4-Participant
(To:GarethOakes)

Interesting approach, Gareth! Thank you for taking the time to contribute that. I will make a note of this for internal discussion. One thing that comes to mind is that the result window popping up every minute might be an annoyance for the writers. Even with a more leisurely 5 or 10 minute interval, I can almost hear them complaining already. 🙂 

-Jay

 

Yes agreed 🙂 I can't remember off the top of my head but if you dig a little you may be able to find the ACL functions to run each cc check step one at a time, and only popup if there is an error. That way you could do just a quick and silent Schematron check every minute.

Announcements

Top Tags