Reply to: Script Example: Custom Validation Log MessagesSeptember 26, 2009 at 1:16 am
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:
var elem = cd.Element;
var name = elem.tagName;
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):
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).