IP Library Granted Patent US 7,721,202
Granted Patent B2
US 7,721,202 · App. 10/222,752 · Granted May 18, 2010

XML streaming transformer

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 7,721,202
App. No.
10/222,752
Granted
May 18, 2010
Kind
B2
Abstract

The present invention includes devices and methods to specify a document transformation. A template specifies a transformation that is applied to a document in a streaming mode, without building a full object tree in memory representing the document.

Claims (58)

1. A computer-implemented method of transforming a document, including:

receiving events in a stream generated by parsing of an input file using a computer, including a plurality of element start-events, input events and element end-events;

responding to an element start-event for an element by matching an element name for the element to a template name for a named template and activating the named template or, lacking a match, by treating the element as content of a parent element;

responding to an element end-event for a current element using the named template that was activated in response to the element start-event for the current element, if any, including:

responsive to instructions in the matching named template, outputting at least some of literal text or input events corresponding to the current element;

clearing the input events corresponding to content of the current element; and

deactivating the matching named template.

2. The method of claim 1 , wherein the events in the stream correspond to an electronic commerce document.

3. The method of claim 1 , wherein the events in the stream correspond to a document comprising character data encoding text characters and markup data identifying sets of storage units according to a logical structure of the document.

4. The method of claim 3 , wherein a plurality of the named template instances are stored together in a templates source.

5. The method of claim 4 , wherein responding to the element start-event further includes activating one or more variables in a scope corresponding to the named template and responding to a corresponding element end-event further includes deactivating the variables.

6. The method of claim 3 , wherein responding to the element start-event further includes activating one or more variables in a scope corresponding to the named template and responding to a corresponding element end-event further includes deactivating the variables.

7. The method of claim 1 , wherein the events in the stream correspond to an electronic commerce document comprising character data encoding text characters and markup data identifying sets of storage units according to a logical structure of the electronic commerce document.

8. The method of claim 1 , wherein a plurality of the named template instances are stored together in a templates source.

9. The method of claim 2 , wherein a plurality of the named template instances are stored together in a templates source.

10. The method of claim 1 , wherein responding to the element start-event further includes activating one or more variables in a scope corresponding to the named template and responding to a corresponding element end-event further includes deactivating the variables.

11. The method of claim 10 , wherein responding to the element end-event corresponding to the named template further includes processing logic instructions to manipulate the variables.

12. The method of claim 11 , wherein the logic instructions optionally include substring and concatenation.

13. The method of claim 11 , wherein the logic instructions optionally include if and choose flow control operators.

14. The method of claim 13 , wherein responding to the element start-event further includes, in response to an instruction associated with the matching named template, initiating creation of a tree representation of the element and sub-elements within the scope of named template.

15. The method of claim 11 , wherein the logic instructions optionally include if, chose, when, otherwise and for-each flow control operators.

16. The method of claim 1 , wherein responding to the element start-event further includes, in response to an instruction associated with the matching named template, creating a tree representation of the element and sub-elements within the scope of named template.

17. A computer-implemented method of transforming a document, including:

receiving events in a stream generated by parsing of an input file using a computer, including a plurality of element start-events, input events and element end-events;

responding to an element start-event for an element by matching an element name for the element to a template name for a named template and activating the named template and variables, if any, in a scope corresponding to the named template;

responding to a nested element start-event by matching an element name for the nested element to a template name for an additional named template and activating the additional named template and variables, if any, in a scope corresponding to the additional named template or, lacking a match, by treating the nested element as content of the parent element;

responding to input events according to instructions in a most recently activated named template, wherein the instructions optionally include assigning input to one or more of the variables;

responding to an element end-event by processing the corresponding named template that was activated in response to the element start-event, if any, including

processing instructions in the named template, wherein the instructions optionally include manipulating the variables and outputting at least some of literal text and the variables;

clearing the variables in a scope of the corresponding named template; and

deactivating the corresponding named template.

18. The method of claim 17 , wherein the events in the stream correspond to an electronic commerce document.

19. The method of claim 18 , wherein a plurality of the named template instances are stored together in a templates source.

20. The method of claim 17 , wherein the events in the stream correspond to a document comprising character data encoding text characters and markup data identifying sets of storage units according to a logical structure of the document.

21. The method of claim 20 , wherein a plurality of the named template instances are stored together in a templates source.

22. The method of claim 17 , wherein the events in the stream correspond to an electronic commerce document comprising character data encoding text characters and markup data identifying sets of storage units according to a logical structure of the electronic commerce document.

23. The method of claim 17 , wherein a plurality of the named template instances are stored together in a templates source.

24. The method of claim 17 , wherein responding to the element end-event corresponding to the named template further includes processing logic instructions to manipulate the variables.

25. The method of claim 24 , wherein the logic instructions optionally include substring and concatenation.

26. The method of claim 24 , wherein the logic instructions optionally include if and choose flow control operators.

27. The method of claim 26 , wherein responding to the element start-event further includes, in response to an instruction associated with the matching named template, creating a tree representation of the element and sub-elements within the scope of named template.

28. The method of claim 24 , wherein the logic instructions optionally include if, chose, when, otherwise and for-each flow control operators.

29. The method of claim 17 , wherein responding to the element start-event further includes, in response to an instruction associated with the matching named template, creating a tree representation of the element and sub-elements within the scope of named template.

30. A method of memory utilization while performing a transformation on an XML document, including:

loading a template including one or more subtemplates;

processing an event stream resulting from sequentially processing of an input source using a computer, including repeatedly

matching a template name for a subtemplate to an element name for a start-event in the input source;

buffering an input stream until an end-event matched to the start-event is received; and

processing instructions in the subtemplate that was activated in response to the element start-event to transform the buffered input stream, outputting results of the processing and releasing for reuse memory used for the buffering and the processing.

31. The method of claim 30 , wherein matching the subtemplate to the start-event further includes activating one or more variables in a scope corresponding to the subtemplate and releasing for reuse further includes deactivating the variables.

32. The method of claim 30 , wherein the instructions optionally include substring and concatenation.

33. The method of claim 30 , wherein the instructions optionally include if and choose flow control operators.

34. The method of claim 30 , wherein the instructions optionally include if, chose, when, otherwise and for-each flow control operators.

35. The method of claim 30 , wherein the instructions optionally include invoking user custom extensions.

36. The method of claim 35 , wherein the user custom extensions are written in a Java programming language.

37. The method of claim 30 , further including, prior to processing the subtemplate, invoking at least one additional handler to pre-process the input stream.

38. The method of claim 30 , wherein the outputting of results includes invoking at least one additional handler to further process the results of processing the subtemplate.

39. The method of claim 30 , wherein matching the subtemplate to the start-event further includes, in response to an instruction associated with the subtemplate, creating a tree representation of the element and sub-elements within the scope of the subtemplate.

Assignments (8)
CORRECTIVE ASSIGNMENT TO CORRECT THE EFFECTIVE DATE OF THE PATENT ASSIGNMENT AGREEMENT DATED NOVEMBER 30, 2021 PREVIOUSLY RECORDED AT REEL: 058426 FRAME: 0791. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jan 14, 2022
From: OPEN INVENTION NETWORK LLC
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 058736/0436 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2021
From: OPEN INVENTION NETWORK LLC
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 058426/0791 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 11, 2017
From: WELLS FARGO FOOTHILL, INC.
To: CORMINE, LLC
Reel/Frame 042446/0085 →
CHANGE OF NAME Recorded May 11, 2017
From: CORMINE, LLC
To: PERFECT COMMERCE HOLDINGS, LLC
Reel/Frame 042446/0156 →
PATENT SECURITY AGREEMENT Recorded Apr 14, 2006
From: PERFECT COMMERCE, INC.; PERFECT COMMERCE OPERATIONS, INC.; COMMERCE ONE, LLC; PERFECT COMMERCE LP; PANTELLOS CORPORATION; PANTELLOS I INCORPORATED; PANTELLOS II INCORPORATED
To: WELLS FARGO FOOTHILL, INC., AS AGENT
Reel/Frame 017468/0615 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 1, 2006
From: JGR ACQUISITION, INC.
To: OPEN INVENTION NETWORK, LLC
Reel/Frame 017519/0977 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 27, 2004
From: COMMERCE ONE OPERATIONS, INC.
To: JGR ACQUISITION, INC.
Reel/Frame 015494/0720 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2002
From: FUCHS, MATTHEW; ZHU, CHANGYI
To: COMMERCE ONE OPERATIONS, INC.
Reel/Frame 013618/0783 →