XML streaming transformer (XST)
First Claim
Patent Images
1. A computer-implemented method of transforming a document, including:
- using a processor, responding to an element start-event in an event data stream by matching an element name for the element start-event to a template name and activating a matching-name template and, lacking a match, by treating the element between the element start-event and an element end-event as content of a parent element;
responding to the element end-event paired to the start-event using the template that was activated, including;
responsive to instructions in the matching-name template, outputting at least some of literal text or input events received in the event data stream between the start-event and the end-event;
clearing the input events received in the event data stream between the start-event and the end-event; and
deactivating the matching named template.
2 Assignments
0 Petitions
Accused Products
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.
-
Citations
20 Claims
-
1. A computer-implemented method of transforming a document, including:
-
using a processor, responding to an element start-event in an event data stream by matching an element name for the element start-event to a template name and activating a matching-name template and, lacking a match, by treating the element between the element start-event and an element end-event as content of a parent element; responding to the element end-event paired to the start-event using the template that was activated, including; responsive to instructions in the matching-name template, outputting at least some of literal text or input events received in the event data stream between the start-event and the end-event; clearing the input events received in the event data stream between the start-event and the end-event; and deactivating the matching named template. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-implemented method of transforming a document, including:
-
using a processor, responding to an element start-event in an event data stream by matching an element name for the element start-event to a template name and activating a first matching-name template and, lacking a match, by treating the element between the element start-event and an element end-event as content of a parent element; responding to a nested element start-event in the event data stream by matching an element name for the nested element to a second template name and activating the second matching-name template; responding to additional events in the event data stream according to instructions in a most recently activated matching-name template; responding to the element end-event paired to the nested element start-event by processing the second matching-name template, including responsive to instructions in the matching-name template, outputting at least some of literal text or input events received in the event data stream between the nested start-event and the end-event; clearing the input events received in the event data stream between the nested start-event and the end-event; and deactivating the second matching-name template. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A non-transitory computer memory media, including computer program instructions that direct a processor to:
-
respond to an element start-event in an event data stream by matching an element name for the element start-event to a template name and activating a matching-name template and, lacking a match, by treating the element between the element start-event and an element end-event as content of a parent element; respond to the element end-event paired to the start-event using the template that was activated, including; responsive to instructions in the matching-name template, outputting at least some of literal text or input events received in the event data stream between the start-event and the end-event; clearing the input events received in the event data stream between the start-event and the end-event; and deactivate the matching named template. - View Dependent Claims (16, 17)
-
-
18. A non-transitory computer memory media, including computer program instructions that direct a processor to:
-
load into memory one or more templates; process an event stream, including repeatedly matching a template name for a template to an element name for a start-event in the event stream and, lacking a match, by treating the element between the element start-event and an element end-event as content of a parent element; buffering an input stream until the end-event matched to the start-event is received; and process instructions in the template with matching name to transform the buffered input stream, output results of the transform of the buffered input stream and release for reuse memory used for the buffering and to process the instructions. - View Dependent Claims (19, 20)
-
Specification