Claims
- 1. One or more computer-readable media comprising computer-executable instructions that perform the following when executed by a computer:
locate a node of an extensible markup language (XML) data file using a first XPath expression; validate or invalidate the node using a second XPath expression; and display an error message if the node is invalid.
- 2. The computer-readable media of claim 1, further comprising:
reading a first attribute and a second attribute from an XML element; and parsing the first xpath expression from the first attribute and the second xpath expression from the second attribute.
- 3. The computer-readable media of claim 1, wherein the locate the node includes comparing each node of the XML data file against a match pattern within the first XPath expression.
- 4. The computer-readable media of claim 1, wherein the validation or invalidation of the node includes evaluating data within the node against the second XPath expression.
- 5. The computer-readable media of claim 1, wherein the validation or invalidation of the node includes evaluating data within the node against a Boolean operator within the second XPath expression.
- 6. One or more computer-readable media comprising:
a first XPath expression usable to locate a node of an extensible markup language (XML) data file; a second XPath expression usable to validate or invalidate the node; and an error message usable to indicate, if the node is invalidated, that the node is invalidated.
- 7. The computer-readable media of claim 6, wherein the first XPath expression and the second XPath expression are within an XML element.
- 8. The computer-readable media of claim 6, wherein the second XPath expression specifies a Boolean operator.
- 9. One or more computer-readable media comprising computer-executable instructions that perform the following when executed by a computer:
read an extensible markup language (XML) element containing a first attribute, a second attribute, and a third attribute, wherein the first attribute indicates a match pattern; parse the first attribute into a first XPath expression; find nodes in an XML data file that match the match pattern by evaluating the nodes of the XML data file against the first XPath expression; parse the second attribute into a second XPath expression, wherein the second attribute specifies an expression context relative to each of the matching nodes; obtain a set of nodes from the matching nodes that define the expression context for each of the matching nodes by evaluating the matching nodes against the second XPath expression; parse the third attribute into a third XPath expression, wherein the third attribute specifies a Boolean expression condition; and determine if each node of the set of nodes violates the third XPath expression by evaluating each node of the set of nodes against the third XPath expression.
- 10. The computer-readable media of claim 9, further comprising:
associate each node of the set of nodes that violates the third XPath expression with an error message.
- 11. The computer-readable media of claim 9, further comprising:
associate each node of the set of nodes that violates the third XPath expression with an error message; and display the error message for each node associated with the error message.
- 12. One or more computer-readable media comprising:
an extensible markup language (XML) element, the XML element having a match attribute and an expression attribute, and wherein: the match attribute identifies nodes of an XML data file; and the expression attribute contains an XPath expression capable of being evaluated as true or false against data within each of the identified nodes.
- 13. The computer-readable media of claim 12, wherein the match attribute includes a second XPath expression identifying the nodes of the XML data file.
- 14. The computer-readable media of claim 12, wherein the XML element further comprises:
an expression-context attribute that specifies parent nodes that are roots of the identified nodes, and a show-error-location attribute that specifies, based on the parent nodes of the identified nodes, where on a representation of the XML data file an error message can be displayed.
- 15. One or more computer-readable media comprising computer-executable instructions that perform the following when executed by a computer:
determine that a node of an extensible markup language (XML) data file is associated with an XML element; read, from the XML element, an error message attribute, the error message attribute including an error message; and associate the error message with the node.
- 16. The computer-readable media of claim 15, further comprising:
display the error message on a display in which the node of the XML data file is represented.
- 17. The computer-readable media of claim 15, further comprising:
read, from the XML element, a mode attribute, the mode attribute setting forth a modal or modeless type of error present in the node; and if the type of error present in the node is the modal type, rolling back data in the node.
- 18. The computer-readable media of claim 15, further comprising:
read, from the XML element, a mode attribute, the mode attribute setting forth a modal or modeless type of error present in the node; and if the type of error present in the node is the modal type, rolling back data in the node and displaying the error message on a display in which the node of the XML data file is represented.
- 19. The computer-readable media of claim 15, further comprising:
read, from the XML element, a mode attribute, the mode attribute setting forth a modal or modeless type of error present in the node, and a second error message attribute, the second error message attribute including a second error message; and if the type of error present in the node is the modal type, displaying the error message and the second error message on a display in which the node of the XML data file is represented, or if the type of error present in the node is the modeless type, displaying the error message on the display.
- 20. One or more computer-readable media comprising computer-executable instructions that perform the following when executed by a computer:
read a first extensible markup language (XML) element containing a first attribute that indicates a match pattern; parse the first attribute into an XPath expression; find one or more nodes in an XML data file that match the match pattern by evaluating the nodes of the XML data file against the XPath expression; determine if one or more of the matching nodes violate a schema associated with the XML data file; read a second XML element associated with the first XML element, the second XML element containing an error message; and associate the error message with each of the matching nodes that violate the schema.
- 21. The computer-readable media of claim 20, further comprising:
display the error message for each of the matching nodes associated with the error message.
- 22. One or more computer-readable media comprising computer-executable instructions that perform the following when executed by a computer:
read an extensible markup language (XML) element containing a first attribute and a second attribute, wherein the first attribute indicates a match pattern; parse the first attribute into an XPath expression; parse the second attribute into a handler-object name; create a handler object referencing executable code and having the handler-object name; find nodes in an XML data file that match the match pattern by evaluating the nodes of the XML data file against the XPath expression; associate the found nodes with the handler-object name; and execute, with aid from the handler-object name, the executable code referenced by the handler object when one of the found nodes is modified.
- 23. The computer-readable media of claim 22, wherein the execution of the executable code accepts or rejects the modification to the found node.
- 24. The computer-readable media of claim 22, wherein the execution of the executable code indicates to a user whether or not the modification to the found node violates a validation rule.
- 25. The computer-readable media of claim 22, wherein the execution of the executable code modifies other nodes of the XML data file.
- 26. The computer-readable media of claim 22, wherein the execution of the executable code modifies files associated with the XML data file.
- 27. The computer-readable media of claim 22, wherein the modification includes the found node being deleted from the XML data file.
- 28. The computer-readable media of claim 22, further comprising:
evaluate a new node added to the XML data file against the XPath expression; associate the new node with the handler-object name if the new node matches the match pattern; and execute, with aid from the handler-object name, the executable code referenced by the handler object.
- 29. One or more computer-readable media comprising:
an extensible markup language (XML) element, the XML element having a match attribute and a handler-object attribute, and wherein: the match attribute identifies nodes of an XML data file; and the handler-object attribute identifies executable code that is capable of being called to validate data in each of the identified nodes when data in each of the identified nodes is altered.
- 30. The computer-readable media of claim 29, wherein the match attribute includes an XPath expression identifying the nodes of the XML data file.
- 31. An apparatus comprising:
means for locating a node of an extensible markup language (XML) data file using a first XPath expression; means for validating or invalidating the node using a second XPath expression; and means for displaying an error message if the node is invalid.
- 32. The apparatus of claim 31, further comprising:
means for reading a first attribute and a second attribute from an XML element; and means for parsing the first XPath expression from the first attribute and the second XPath expression from the second attribute.
- 33. The apparatus of claim 31, wherein the means for locating the node includes comparing each node of the XML data file against a match pattern within the first XPath expression.
- 34. The apparatus of claim 31, wherein the means for validating or invalidating the node includes evaluating data within the node against the second XPath expression.
CROSS REFERENCE TO RELATED PATENT APPLICATION
[0001] This is a continuation-in-part of a co-pending U.S. patent application having Ser. No. 10/402,640, a filing date of Mar. 28, 2003, and an attorney's docket number of MS1-1341US, for SYSTEM AND METHOD FOR REAL-TIME VALIDATION OF STRUCTURED DATA FILES of Jean-Marie H. Larcheveque et al. This co-pending U.S. patent application is commonly assigned herewith and is hereby incorporated herein by reference for all that it discloses.
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
10402640 |
Mar 2003 |
US |
Child |
10723730 |
Nov 2003 |
US |