[xquery-talk] and what I think we should tackle right now

Michael Kay mike at saxonica.com
Tue May 21 07:25:46 PDT 2013

On 21 May 2013, at 14:14, Adam Retter wrote:

> Personally I think that XQuery can have support for consuming and
> producing JSON, but do I want to work with JSON inside XQuery - not
> really. I do a LOT of work with both JSON and XML, for JSON work I
> tend to use JavaScript and for XML I tend to use XQuery/XSLT.
> Should there be one language to do both, perhaps. Is it XQuery, I dont
> think so. 

I think the essential point is that when you've got a language that fits its data model, you're happy, and when you're using a language that doesn't fit it's data model, you're forever cutting against the grain. The famous impedance mismatch. XSLT and XQuery are very closely designed around the XML data model with all its peculiar quirks; that makes them very good at doing XML, and a bit of a peculiar choice for doing anything else. Designing a data model that can embrace XML and JSON with a high level of fidelity is not easy, as we are finding - it's easy to find you've designed a camel (or a chimera in Jeni's memorable terms).

No-one in my view has ever really succeeded in designing a data model that works well for integrating heterogeneous data sources. They've been trying for at least 40 years. My own preferred candidate is the functional data model, because it so minimalist, but it's not exactly a fashionable candidate right now.

Michael Kay

More information about the talk mailing list