1. A computer-implemented method for querying a structured document, comprising: identifying auxiliary structures including pre-computed information applicable to accelerate user query processing by detecting containment mappings between query expressions and expressions in the auxiliary structures; and finding the user query result by executing a rewritten query that exploits the pre-computed information for each detected containment mapping.