System and method for validating hierarchically-organized messages
First Claim
1. A computer-readable medium encoded with computer-executable instructions to perform a method of validating a message comprising:
- encountering a first element of the message;
consulting a first validation table to identify a first delegate that corresponds to said first element;
applying said first delegate to said first element;
encountering a second element that is a root of a subtree of said first element; and
applying a second delegate to said second element in accordance with said first validation table.
2 Assignments
0 Petitions
Accused Products
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.
26 Citations
25 Claims
-
1. A computer-readable medium encoded with computer-executable instructions to perform a method of validating a message comprising:
-
encountering a first element of the message;
consulting a first validation table to identify a first delegate that corresponds to said first element;
applying said first delegate to said first element;
encountering a second element that is a root of a subtree of said first element; and
applying a second delegate to said second element in accordance with said first validation table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method of validating of a message comprising:
-
creating one or more validation delegates, each validation delegate being adapted to validate a particular type of element of the message;
creating a first validation table that specifies at least one of the validation delegates for each type of element of the message; and
applying a validation engine to the message, wherein the validation engine, for each element of the message, consults said first validation table to identify a validation delegate to be applied to the element, and applies the identified validation delegate to the element. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A computer-readable medium having stored thereon a data structure comprising:
-
a plurality of element names, each element name identifying a portion of a message; and
for each element name, a corresponding name of a first delegate, each first delegate comprising code that validates the element of the message that corresponds to the element name. - View Dependent Claims (19, 20)
-
-
21. A system for validating a message organized in the form of a tree, the system comprising:
-
a first validation table indicating a plurality of delegates, each delegate corresponding to a name of an element in the tree;
a validation engine that traverses the tree and, for each element encountered in the traversal of the tree, consults the first validation table to identify one of the plurality of delegates that is to be applied to the encountered element, and that applies the identified delegate by invoking the delegate. - View Dependent Claims (22, 23, 24, 25)
-
Specification