Hi, Am I right in assuming that if I add the element's name to the After pattern, and then compare it with the name of the closing tag, I can check for well-formedness during validation? That is, instead of maintaining a separate stack of open elements, I can keep the values in After patterns? Or am I missing something obvious? David Tolpin