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 searching for a named template that matches the element start-event,upon finding a matching named template, activating the named template, andupon not finding the matching named template, treating an element between the element start-event and an element end-event of the event data stream as content of a parent element; and
responding to the element end-event paired to the element start-event, using the activated named template, including;
responsive to instructions in the named template, outputting at least some of literal text, input events received in the event data stream between the element start-event and the element end-event, or variables that store values from content, attributes or labels of an element; and
clearing at least the input events received in the event data stream between the element start-event and the element end-event.
0 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.
29 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 searching for a named template that matches the element start-event, upon finding a matching named template, activating the named template, and upon not finding the matching named template, treating an element between the element start-event and an element end-event of the event data stream as content of a parent element; and responding to the element end-event paired to the element start-event, using the activated named template, including; responsive to instructions in the named template, outputting at least some of literal text, input events received in the event data stream between the element start-event and the element end-event, or variables that store values from content, attributes or labels of an element; and clearing at least the input events received in the event data stream between the element start-event and the element end-event. - 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 searching for a first named template that matches the element start-event, upon finding a matching first named template, activating the first named template, and upon not finding the matching first named template treating an 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 the nested element start-event to a second named template and activating the second named template; responding to additional events in the event data stream according to instructions in a most recently activated named template; and responding to the element end-event paired to the nested element start-event by processing the second named template, including; responsive to instructions in the second named template, outputting at least some of literal text, input events received in the event data stream between the nested element start-event and the element end-event, or variables that store values from content, attributes or labels of an element; and clearing at least the input events received in the event data stream between the nested element start-event and the element end-event. - 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 searching for a named template that matches the element start-event, upon finding a matching named template, activating the named template, and upon not finding the matching named template, treating an element between the element start-event and an element end-event of the event data stream as content of a parent element; and respond to the element end-event paired to the element start-event, using the activated named template, by; responsive to instructions in the named template, outputting at least some of literal text, input events received in the event data stream between the element start-event and the element end-event, or variable that store values from content, attributes or labels of an element; and clearing at least the input events received in the event data stream between the element start-event and the element end-event. - 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; and process an event data stream, including repeatedly; searching for a named template that matches an element start-event in the event data stream, upon finding a matching named template, activating the named template, and upon not finding the matching named template treating an element between the element start-event and an element end-event of the event data stream as content of a parent element; buffering an input stream until the element end-event matched to the element start-event is received; and processing instructions in the matching named template to transform the buffered input stream, and to output results of the transform of the buffered input stream. - View Dependent Claims (19, 20)
-
Specification