1. A method comprising: receiving a first query that conforms to a first XML query language; determining that an operator included in the first query requires one or more node references as operands of the operator; and generating, based on the first query, a second query that conforms to a second XML query language that is different than the first XML query language, wherein the second query includes a particular operator that, when executed, causes a reference, to a node in an XML document, to be returned.