Accessing a single object with a global id would be a case of referring to "//id=". If you wanted to search for objects with a certain field (eg: name = 'Bob'), you'd go "//name=['Bob']". How about objects not named Bob, would the syntax be formed as "//name!=['Bob']"?. How about for objects of position greater than 100 on the Y axis - "//position/Y>"? Or between Y 100 and Y 500 - "//position/Y>=&&<="?
This works fine for simple queries, but what if you then needed to combine two queries to look for objects with position Y >= 100 and X >= 50? I wonder how such syntax would work? Perhaps "//position/[ Y>= && X>= ]".
The idea seems to be well suited for a single "attribute is this" query, but gets fugly when more conditional or complex logic is used.
I'm thinking that maybe a sql-like language would be better.