To do this, create a text file (for this example we'll call it 'userfunctions.txt') and copy and paste the follow functions into it:
Code: Select all
function onStartTag_tbody() {
if !isTagExplicit { MessageEx(5, 2024070100, MSG_WARNING, 'My User Functions', 'Implied <'+CurrentTagName+'> tag before this tag.'); }
}
function onEndTag_table() {
if !hasChildElement('thead') { MessageEx(5, 2024070101, MSG_WARNING, 'My User Functions', 'No <thead> element found for this table.'); }
if !hasChildElement('tfoot') { MessageEx(5, 2024070102, MSG_WARNING, 'My User Functions', 'No <tfoot> element found for this table.'); }
}
If everything is working correctly then, when appropriate, you should see the new validator warnings in a new message category called 'My User Functions' in the 'Grouped' tab of the Results Window.