[xquery-talk] [xml-dev] Mistakes made in the design of XQuery 3.1

daniela florescu dflorescu at me.com
Wed May 13 02:31:56 PDT 2015

> You misread me. Though not an expert but I have written some  JSONiq so I can appreciate what you are saying.
>  When i say JSON people I mean people like Marc (from the linkedin discussion you started) and some others I have worked with who believe all the myths  and think everything can and should be done in JSON. OK maybe not that far out because such a person would never come to an XQuery WG but you know the sort of people I mean.

Yes, there are plenty of people in the world who consider XML and everything related to it (including XQuery) evil…..and JSON is all they want to see.

There are PLENTY of those.

As you say, in order to “educate” those guys about how to avoid the traps of building a silly query language of their own for JSON/semi-structured data
  (because querying semi-strcuturded data is NOT trivial and   COMPLETELY different from querying flat, regular, relational data, so, no, SQL is NOT an answer…),
 you need to be a  little … “diplomat”… and understand THEIR needs, and talk THEIR language.

Stuff that the esteemed XQuery 3.1 WG had no clue how to do. I guess they didn’t care either.

Otherwise you end up with those hacks that are all the JSON query languages designed by Cassandra, MongoDb, etc, etc. 

No expressive power, and, worse, no clean semantics. (“let’s run it, and see what this query means”…... kind of semantics..)


Hence the subset of JSONiq, which is based on the rich expressive power of XQuery and has the clean semantics of XQuery, yet syntactically 
had absolutely NO mentioning of angle brackets AT ALL.

Just pure, pure JSON.

We did a mistake though, and forgot to rename “for" into “from” and “return” into “select” though …

I am shocked when I hear people telling me that they don’t understand the semantics of

for $x in collection(“blah”)
return $x.a

but it is obviously clear to them the semantics of the following expression

from $x in collection(“blah”)
select $x.a


What can I say !? We learned that habits are extremely strong for some people, and keywords hold a powerful meaning….

Best regards

More information about the talk mailing list