Home Forums XMetaL Tips and Tricks Script Example: Custom Validation Log Messages Reply To: Script Example: Custom Validation Log Messages

dcramer

Reply to: Script Example: Custom Validation Log Messages

This is a cool trick and I'd like to be able to use it. Your demo works perfectly for me, but when I add it to my dtd's macro file, it does odd things. Here's a simple test case. I added the following to docbookx.mcr in the same directory as the DocBook DTD:

[code]


var cd = Application.CheckData;
var elem = cd.Element;
var name = elem.tagName;
Application.Alert(name);
]]>


[/code]

I use catalog files so XMetaL will find the local copy of the DTD. When I validate the following simple document with that macro in place, nothing happens (i.e. the doc validates fine with no alerts):

[code]


  Guide to Creating, Editing, and Managing XML-based Documentation
 
title blahdsfsss   

[/code]

It is even stranger when I add it to my real macro file (the one that I use with my customization of the DocBook DTD) and with a real (i.e. longer) document. A few Application.Alert(name)s do fire, but only about seven (a few keyword and subject elements and their parent keywordset and subjectset elements).

Any ideas?

Thanks,
David

Reply

Products
Downloads
Support