Patent Document ID: 7571160
Application ID: 10999746

Base Claim:
1. A method for an implementation of XML Query language, comprising the steps of: receiving an XQuery request; creating a token stream representation of one or more XML documents that are required to process said XQuery request, wherein the step of creating the token stream further comprises accessing an XML document, parsing a schema associated with the XML document, using the contents of the schema associated with the XML document to create a tokenized representation of the entire XML document, as a sequence of tokens describing the XML document, and including within the sequence of tokens a namespace declaration for the XML document, name tokens indicating a fully qualified name for each element, and name tokens specifying a type of the element as defined in the schema, and populating the tokens with one of data from the XML schema or data from the XML document; transforming said XQuery request into a second query that can work on said token stream representation; and executing said second query on said token stream representation, wherein said transforming step further comprises converting said XQuery request into a sequence of elementary operators, and applying the sequence of elementary operators against the tokenized representation of the XML document, with each operator applying a transformation of the operator input and feeding the operator output to the next operator, and wherein instead of completely consuming input before performing the transformation, each operator consumes a minimal amount of input and immediately begins to produce results, that is directly available to the next operator.

---

Claim 6:
6. The method according to claim 1 , wherein: said token stream representation comprises typed tokens, wherein each typed token specifies the type of XML element of the XML document represented.