11. The system of claim 9 further comprising: an index matcher for finding an index that matches said pre-filter.
9. A system comprising: hardware or a combination of hardware and software, and an XML compilation processor, said XML compilation processor comprising: an execution compiler transforming an XML query into an XML query plan; and a query rewrite processor identifying an XPath within said XML query, and transforming, via query transformation on said XML query, said XPath into a pre-filter of said XML query using said query rewrite processor, wherein said query rewrite processor is adapted to perform said query transformation by transforming the expression: $i[e 1 ][e 2 ] into the expression $i[e 1 ][e 2 ]/e 2 , wherein e 1 is a filter and e 2 is a deterministic XQuery expression, and wherein subsequent to said transforming of the expression, applying said XML query to a sequence of XML items selected from a group consisting of: a sequence of XML items extracted from one or more extensible markup language (XML) documents, a sequence of XML items supplied by an Internet service, a sequence of HTML items extracted from one or more hypertext markup language (HTML) documents, and a sequence of HTML items supplied by an Internet service.