1. A method for determining whether an index, whose definition of the index includes a row pattern expression, may be used in processing an XML query, the method comprising: analyzing the XML query, wherein the XML query includes a first particular set of one or more expressions; wherein none of the expressions in the first particular set are the same as the row pattern expression; determining that the index may be used in processing the XML query; and in response to determining that the index may be used in processing the XML query, rewriting the XML query to generate a new XML query that references the index.