15. The method according to claim 14 wherein the step of creating a plurality of tokens according to the schema for that XML document further comprises including within each token a namespace declaration for the XML document.
14. A method for an implementation of XML Query language, comprising the steps of: receiving an XQuery request; determining one or more XML documents that will be used to provide data in response to the XQuery request; retrieving an XML schema for each of the one or more XML documents that will be used to provide data; generating a token stream representation of the one or more XML documents by accessing each XML document, parsing the schema associated with that XML document, using the contents of the schema associated with that 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, populating the plurality of tokens with data from the XML document and in accordance with the XML schema, continuing with each XML document to create a token stream representation of the one or more XML documents; transforming the XQuery request into a second query that includes a sequence of elementary operators and that can be applied to the generated token stream representation; and executing the second query on the token stream representation by applying the sequence of elementary operators against the tokenized representation of the one or more XML documents, and requiring each of the sequence of elementary operators to consume a portion of the token stream representation and immediately begin to produce a partial result, that can then be made available to the next elementary operator in the sequence.