XQuery: A unified syntax for linking and querying general XML documents