Abstract:
Systems and methods are disclosed that facilitate formally describing structured documents and complex validation rules associated therewith using value-added XSD schemas (VAXs). Native XSDs can be utilized and annotated to generate VAXs that represent both the structure of a document and the complex validation rules used to validate the documents. VAXs can be annotated with declarative validation rules that can be assessed at run time to facilitate document validation. Additionally, VAXs can be annotated with validation handlers that comprise a predefined library of validation routines that can be called at run time to facilitate document validation.
Abstract:
A mechanism for validating a message, such as an XML message or other hierarchically-organized content. A validation engine walks through the tree represented by the message preferably in depth-first traversal order. Upon encountering each node in the tree, the validation engine consults a validation table to identify a delegate that is to be invoked. The validation engine then invokes the delegate identified for that node, and calls itself recursively on the subtrees of the current node. After the subtrees have been processed, the validation engine again consults the validation table to identify a post-handler for the current node, and then invokes the post-handler. An entry in the validation table may be flagged as “exclusive” to prevent traversal of subtrees of the node corresponding to that entry. Additionally, there may be both global and local validation tables, where the global table is used when a node has no entry in the local table.