Transforming documents using pattern matching and a replacement language
First Claim
Patent Images
1. A computer-implemented method for transforming a document, comprising the steps of:
- (a) creating one or more programs from one or more rule specifications, wherein;
(i) the rules specifications identify one or more transformations of the document to be performed when a pattern match occurs between the document and a source pattern;
(ii) the rules specifications are defined using a first programming language; and
(iii) the document is defined in the first programming language both before and after transformation; and
(b) executing the programs in the computer to perform the transformations of the document when the pattern match occurs between the document and the source pattern.
2 Assignments
0 Petitions
Accused Products
Abstract
A system for specifying transformation rules of Extensible Markup Language (XML) documents into other XML documents, wherein the rule language used is XML itself. The transformation rule specifications identify one or more transformations of the document to be performed when a pattern match occurs between the document and a source pattern. The specifications are used to define class specifications for objects that perform the transformations.
311 Citations
78 Claims
-
1. A computer-implemented method for transforming a document, comprising the steps of:
-
(a) creating one or more programs from one or more rule specifications, wherein;
(i) the rules specifications identify one or more transformations of the document to be performed when a pattern match occurs between the document and a source pattern;
(ii) the rules specifications are defined using a first programming language; and
(iii) the document is defined in the first programming language both before and after transformation; and
(b) executing the programs in the computer to perform the transformations of the document when the pattern match occurs between the document and the source pattern. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
(1) registering one or more of the computer programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) notifying the registered listener to perform one or more of the transformations whenever the pattern match occurs between the source pattern and the document.
-
-
12. The method of claim 11 above, further comprising the step of invoking one or more functions from the notified listener.
-
13. The method of claim 1 above, further comprising the steps of:
-
(1) registering one or more of the computer programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) notifying the registered listener to perform one or more actions whenever the pattern match occurs between the source pattern and the document.
-
-
14. The method of claim 1 above, wherein the rules specification comprises a pattern matching language.
-
15. The method of claim 14 above, wherein the pattern matching language includes one or more components selected from a group comprising:
- (1) a source pattern, (2) a condition, (3) a target pattern, and (4) an action part.
-
16. The method of claim 14 above, wherein the pattern matching language is based upon a schema structure for the document.
-
17. The method of claim 14 above, wherein the schema comprises a regular expression language.
-
18. The method of claim 17 above, wherein the regular expression language comprises one or more declarations of elements enclosed within an element.
-
19. The method of claim 17 above, wherein the regular expression language includes one or more regular expression operators selected from a group comprising:
-
(1) a “
zero or more”
operator,(2) a “
one or more”
operator,(3) a “
one or the other”
operator,(4) a “
one followed by the other”
operator,(5) a “
zero or one”
operator,(6) a “
grouping”
operator, and(7) an “
any”
operator.
-
-
20. The method of claim 14 above, further comprising the step of optimizing the regular expression language prior to generating the class specifications.
-
21. The method of claim 1 above, wherein the rules specification provides its own namespace within the document.
-
22. The method of claim 1 above, wherein the transformations comprise one or more replacements to be made in the document when the pattern match occurs between the source pattern and the document.
-
23. The method of claim 1 above, wherein the transformations are performed based on an evaluation of one or more conditions for the pattern match between the source pattern and the document.
-
24. The method of claim 23 above, wherein the conditions comprise one or more predicates.
-
25. The method of claim 1 above, wherein the rules specifications include one or more filters for the pattern match between the source pattern and the document.
-
26. The method of claim 1 above, wherein the rules specifications include one or more wildcards for the pattern match between the source pattern and the document.
-
27. An apparatus for transforming a document, comprising:
-
(a) a computer; and
(b) means, performed by the computer, for creating one or more programs from one or more rule specifications, wherein;
(i) the rules specifications identify one or more transformations of the document to be performed when a pattern match occurs between the document and a source pattern;
(ii) the rule specification is defined using a first programming language; and
(iii) the document is defined in the first programming language both before and after transformation; and
(c) means, performed by the computer, for executing the programs in the computer to perform the transformations of the document when the pattern march occurs between the document and the source pattern. - View Dependent Claims (28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78)
(1) means for registering one or more of the programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) means for notifying the registered listener to perform one or more of the transformations whenever the pattern match occurs between the source pattern and the document.
-
-
38. The apparatus of claim 37 above, further comprising means for invoking one or more functions from the notified listener.
-
39. The apparatus of claim 27 above, further comprising:
-
(1) means for registering one or more of the programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) means for notifying the registered listener to perform one or more actions whenever the pattern match occurs between the source pattern and the document.
-
-
40. The apparatus of claim 27 above, wherein the rules specification comprises a pattern matching language.
-
41. The apparatus of claim 40 above, wherein the pattern matching language includes one or more components selected from a group comprising:
- (1) a source pattern, (2) a condition, (3) a target pattern, and (4) an action part.
-
42. The apparatus of claim 40 above, wherein the pattern matching language is based upon a schema structure for the document.
-
43. The apparatus of claim 40 above, wherein the schema comprises a regular expression language.
-
44. The apparatus of claim 43 above, wherein the regular expression language comprises one or more declarations of elements enclosed within an element.
-
45. The apparatus of claim 43 above, wherein the regular expression language includes one or more regular expression operators selected from a group comprising:
-
(1) a “
zero or more”
operator,(2) a “
one or more”
operator,(3) a “
one or the other”
operator,(4) a “
one followed by the other”
operator,(5) a “
zero or one”
operator,(6) a “
grouping”
operator, and(7) an “
any”
operator.
-
-
46. The apparatus of claim 40 above, further comprising means for optimizing the regular expression language prior to generating the class specifications.
-
47. The apparatus of claim 27 above, wherein the rules specification provides its own namespace within the document.
-
48. The apparatus of claim 27 above, wherein the transformations comprise one or more replacements to be made in the document when the pattern match occurs between the source pattern and the document.
-
49. The apparatus of claim 27 above, wherein the transformations are performed based on an evaluation of one or more conditions for the pattern match between the source pattern and the document.
-
50. The apparatus of claim 49 above, wherein the conditions comprise one or more predicates.
-
51. The apparatus of claim 27 above, wherein the rules specifications include one or more filters for the pattern match between the source pattern and the document.
-
52. The apparatus of claim 27 above, wherein the rules specifications include one or more wildcards for the pattern match between the source pattern and the document.
-
54. The article of manufacture of claim 28, wherein the rules specifications identify one or more actions to be performed when a pattern match occurs between the document and a source pattern.
-
55. The article of manufacture of claim 54, wherein the method further comprises the step of performing the actions when the pattern match occurs between the document and the source pattern.
-
56. The article of manufacture of claim 28, wherein the document is an eXtensible Markup Language (XML) document.
-
57. The article of manufacture of claim 56 above, wherein the rules specifications are defined in XML.
-
58. The article of manufacture of claim 57 above, wherein the rules specifications are embedded in the XML document.
-
59. The article of manufacture of claim 57 above, wherein the rules specifications are external to the XML document.
-
60. The article of manufacture of claim 28, wherein the creating step further comprises the step of creating one or more class specifications from the rule specifications and the executing step further comprises the step of instantiating the class specifications as one or more of the programs.
-
61. The article of manufacture of claim 60, wherein the class specifications comprise Java class specifications and the instantiated class specifications comprise Java objects.
-
62. The article of manufacture of claim 28, wherein the programs are selected from a group comprising one or more pattern matching components, one or more replacement components, and one or more action components.
-
63. The article of manufacture of claim 28 above, wherein the method further comprises the steps of:
-
(1) registering one or more of the programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) notifying the registered listener to perform one or more of the transformations whenever the pattern match occurs between the source pattern and the document.
-
-
64. The article of manufacture of claim 63 above, wherein the method further comprises the step of invoking one or more functions from the notified listener.
-
65. The article of manufacture of claim 28 above, wherein the method further comprises the steps of:
-
(1) registering one or more of the programs as a listener to be notified when a pattern match occurs between the source pattern and the document; and
(2) notifying the registered listener to perform one or more actions whenever the pattern match occurs between the source pattern and the document.
-
-
66. The article of manufacture of claim 28 above, wherein the rules specification comprises a pattern matching language.
-
67. The article of manufacture of claim 66 above, wherein the pattern matching language includes one or more components selected from a group comprising:
- (1) a source pattern, (2) a condition, (3) a target pattern, and (4) an action part.
-
68. The article of manufacture of claim 66 above, wherein the pattern matching language is based upon a schema structure for the document.
-
69. The article of manufacture of claim 66 above, wherein the schema comprises a regular expression language.
-
70. The article of manufacture of claim 69 above, wherein the regular expression language comprises one or more declarations of elements enclosed within an element.
-
71. The article of manufacture of claim 69 above, wherein the regular expression language includes one or more regular expression operators selected from a group comprising:
-
(1) a “
zero or more”
operator,(2) a “
one or more”
operator,(3) a “
one or the other”
operator,(4) a “
one followed by the other”
operator,(5) a “
zero or one”
operator,(6) a “
grouping”
operator, and(7) an “
any”
operator.
-
-
72. The article of manufacture of claim 66 above, wherein the method further comprises the step of optimizing the regular expression language prior to generating the class specifications.
-
73. The article of manufacture of claim 28 above, wherein the rules specification provides its own namespace within the document.
-
74. The article of manufacture of claim 28 above, wherein the transformations comprise one or more replacements to be made in the document when the pattern match occurs between the source pattern and the document.
-
75. The article of manufacture of claim 28 above, wherein the transformations are performed based on an evaluation of one or more conditions for the pattern match between the source pattern and the document.
-
76. The article of manufacture of claim 75 above, wherein the conditions comprise one or more predicates.
-
77. The article of manufacture of claim 28 above, wherein the rules specifications include one or more filters for the pattern match between the source pattern and the document.
-
78. The article of manufacture of claim 28 above, wherein the rules specifications include one or more wildcards for the pattern match between the source pattern and the document.
-
53. An article of manufacture embodying logic for performing a method for transforming a document, the method comprising the steps of:
-
(a) creating one or more programs from one or more rule specifications, wherein;
(i) the rules specifications identify one or more transformations of the document to be performed when a pattern match occurs between the document and a source pattern;
(ii) the rule specification is defined using a first programming language; and
(iii) the document is defined in the first programming language both before and after transformation; and
(b) executing the programs in the computer to perform the transformations of the document when the pattern match occurs between the document and the source pattern.
-
Specification