Xquery library for querying models