Customizing Assert Error Messages

To customize the error messages that the Xerces or Saxon validation engines display for the <assert> and <assertion> elements, set the @message attribute on these elements. The value of the @message attribute is the error message displayed if the assertion fails.