IP Library › Granted Patent US 10,372,809
Granted Patent B2
US 10,372,809 · App. 14/830,491 · Granted Aug 6, 2019

Validating an XML document

Inventors: Timothy J. Baldwin (Swanmore, GB); Duncan G. Clark (Yateley, GB); Xin Peng Liu (Beijing, CN); Xi Ning Wang (Beijing, CN); Liang Xue (Beijing, CN); Yu Chen Zhou (Beijing, CN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F17/246G06F17/2247G06F17/2725G06F16/258G06F16/86G06F16/9577G06F17/227G06F17/24G06F17/272G06F17/2872G06Q10/06G06Q10/10G16C20/70
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,372,809
App. No.
14/830,491
Granted
Aug 6, 2019
Kind
B2
Abstract

At least one XML document to be validated is parsed, and XML data in the at least one XML document is represented as data objects in at least one data object model in a memory. At least one rule document is parsed and a rule object model that includes rule objects is created in the memory. At least part of the data objects are extracted from the at least one data object model and at least part of rule objects are extracted from the rule object model. Partial validation is performed in a corresponding execution context that validates the extracted at least part of the data objects based upon the extracted at least part of the rule objects.

Claims (42)

1. A method for validating an XML document, comprising:

parsing at least one XML document to be validated and representing XML data in the at least one XML document as data objects in at least one data object model in a memory;

parsing at least one rule document and representing rule data parsed from the at least one rule document as scoped rule objects in a rule object model in the memory;

extracting part of the data objects from the at least one data object model and extracting part of the scoped rule objects from the rule object model; and

performing a partial validation in a corresponding execution context that supports a fail-fast implementation, of the extracted part of the data objects based upon a scope specified by the extracted part of the scoped rule objects.

2. The method according to claim 1 , where the part of the scoped rule objects are extracted from the rule object model according to predefined rule extraction criteria.

3. The method according to claim 1 , where the part of the data objects are extracted from the data object model according to predefined data extraction criteria.

4. The method according to claim 1 , further comprising:

generating an execution context for at least one scoped rule object of the extracted part of the scoped rule objects according to a predefined function, registering the execution context to a context registry, and performing validation of the at least one scoped rule object in the execution context.

5. The method according to claim 1 , further comprising extracting the part of the scoped rule objects from the rule object model and the part of the data objects from the data object model according to a predefined function.

6. The method according to claim 1 , further comprising stopping the partial validation in response to a fail-fast rule of the fail-fast implementation being triggered.

7. The method according to claim 1 , where the at least one rule document comprises at least one Schematron document and the scoped rule objects in the rule object model maintain a hierarchical relationship within the memory corresponding to elements in the at least one Schematron document.

8. The method according to claim 1 , where each element in the at least one XML document is mapped to a data object in the at least one data object model and the data objects maintain a hierarchical relationship within the memory corresponding to the elements in the at least one XML document.

9. The method of claim 1 , where the at least one rule document comprises at least one Schematron document, and the scope specified by the extracted part of the scoped rule objects comprises a subset of a phase element of the Schematron document.

10. A computer program product comprising a non-transitory computer readable storage medium including a computer readable program code, where the computer readable program code when executed on a computer causes the computer to:

parse at least one XML document to be validated and to represent XML data in the at least one XML document as data objects in at least one data object model in a memory;

parse at least one rule document and represent rule data parsed from the at least one rule document as scoped rule objects in a rule object model in the memory;

extract part of the data objects from the at least one data object model and extract part of the scoped rule objects from the rule object model; and

perform a partial validation in a corresponding execution context that supports a fail-fast implementation, of the extracted part of the data objects based upon a scope specified by the extracted part of the scoped rule objects.

11. The computer program product of claim 10 , where the computer readable program code when executed on the computer further causes the computer to extract the part of the scoped rule objects from the rule object model according to predefined rule extraction criteria.

12. The computer program product of claim 11 , where the computer program product is in the form of a computer system, with the computer program product further comprising:

a processor(s) set structured, programmed, and/or connected to execute the computer readable program code stored in the non-transitory computer readable storage medium.

13. The computer program product of claim 10 , where the computer readable program code when executed on the computer further causes the computer to extract the part of the data objects from the data object model according to predefined data extraction criteria.

14. The computer program product of claim 10 , where the computer readable program code when executed on the computer further causes the computer to:

generate an execution context for at least one scoped rule object of the extracted part of the scoped rule objects according to a predefined function, register the execution context to a context registry, and perform validation of the at least scoped one rule object in the execution context.

15. The computer program product of claim 14 , where the computer program product is in the form of a computer system, with the computer program product further comprising:

a processor(s) set structured, programmed, and/or connected to execute the computer readable program code stored in the non-transitory computer readable storage medium.

16. The computer program product of claim 10 , where the computer readable program code when executed on the computer further causes the computer to extract the part of the scoped rule objects from the rule object model and the part of the data objects from the data object model according to a predefined function.

17. The computer program product of claim 10 , where the computer readable program code when executed on the computer further causes the computer to stop the partial validation in response to a fail-fast rule of the fail-fast implementation being triggered.

18. The computer program product of claim 10 , where the at least one rule document comprises at least one Schematron document, and the scoped rule objects in the rule object model maintain a hierarchical relationship within the memory corresponding to elements in the at least one Schematron document.

19. The computer program product of claim 10 , where each element in the at least one XML document is mapped to a data object in the at least one data object model, and the data objects maintain a hierarchical relationship within the memory corresponding to the elements in the at least one XML document.

20. The computer program product of claim 10 , where the computer program product is in the form of a computer system, with the computer program product further comprising:

a processor(s) set structured, programmed, and/or connected to execute the computer readable program code stored in the non-transitory computer readable storage medium.

21. A method comprising:

receiving a schematron data set including information indicative of a plurality of rules, and with each given rule of the plurality of rules including: (i) rule logic data reflecting substance of the given rule, and (ii) rule context data reflecting a context in which the given rule is applicable;

receiving an XML instance document including information indicative of a plurality of instantiated contexts;

selecting a selected subset of rules of the plurality of rules with each rule of the selected subset of rules having the rule context data reflecting the context that matches one of the plurality of instantiated contexts of the XML instance document;

sharing the selected subset of rules; and

performing rule matching on the XML instance document using the selected subset of rules, comprising performing a partial validation that supports a fail-fast implementation of the XML instance document using the selected subset of rules.

22. The method of claim 21 , where sharing the selected subset of rules comprises sharing a subset of the rule context data of the plurality of rules.

23. The method of claim 21 , where selecting the selected subset of rules of the plurality of rules comprises directly selecting the selected subset of rules from the schematron data set.

24. A computer readable storage medium storing instructions which, when executed on one or more programmed processors, carry out the method according to claim 21 , where the computer readable storage medium is not a transitory signal per se.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 19, 2015
From: BALDWIN, TIMOTHY J.; CLARK, DUNCAN G.; LIU, XIN PENG; WANG, XI NING; XUE, LIANG; ZHOU, YU CHEN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 036396/0882 →
Priority Claims (1)
CN 2008 1 0134072 · Jul 24, 2008 · national
Continuity (2)
Continuation 12507261 · Jul 22, 2009
Related Publication 20150356069A1 · Dec 10, 2015