General XMetaL Discussion

  • pooh2583

    f9/xmetal Validator

    Participants 0
    Replies 1
    Last Activity 9 years, 11 months ago

    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

    Reply to: f9/xmetal Validator

    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: AuthorStartupjournalist.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.


  • You must be logged in to reply to this topic.

Lost Your Password?