Pages: 1
Author Topic: f9/xmetal Validator  (Read 2085 times)

Posts: 47

« on: February 25, 2013, 04:59:12 AM »

I have wriiten code in On_Before_Document_Validate,which is used to validate certain attribute values in my xml document,
when F9 is pressed
When one of value is not valid as per my code of validation, error message is shown(defined by me) ,
but after that an alert message of Xmetal comes "In built validator",which XMetaL says,
 "Validation is complete.
document has been validated successfully."

Is it possible to tell XmetaL that documnent is not valid in On_Before_Document_Validate event?

Please reply

Derek Read
Program Manager (XMetaL)

Posts: 2621

« Reply #1 on: February 25, 2013, 12:25:23 PM »

If you want XMetaL Author (or XMAX) to consider your document invalid (even though it is valid according to the DTD) you will need to add a custom error message(s) to the Validation Log. You cannot do that inside this event. There are two different events provided for this purpose.

If your code adds a message to the Validation Log (inside these two other events) then it will be displayed and the document will be considered invalid.

Please have a look at the Journalist demo. The MCR file is here: <xmetal install path>\Author\Startup\journalist.mcr
Search for "On_Check_Element_SimpleContent" and "On_Check_Attribute_Value".

Please also read my other message in response to your earlier question, which sounds almost identical:,2992.0.html.
Pages: 1
Jump to: