[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What are the practical, negative consequences of thinking

  • From: Michael Kay <mike@saxonica.com>
  • To: Eliot Kimber <ekimber@contrext.com>
  • Date: Fri, 17 Feb 2017 10:33:51 +0000

Re:  What are the practical
> That’s why I’ve always found the XML vs. JSON debate to be pointless and sad: it’s a false dichotomy that does neither technology justice and wastes the valuable time of many people. I’m definitely pleased to see XSLT and XQuery embrace JSON because it shouldn’t matter.

I think that what a lot of this discussion misses is that you get substantial benefits when the data model you are using has a good match with the programming language you are using - that is, when you can avoid the famous "impedance mismatch". I believe that the popularity of JSON over XML in some communities is caused largely because there is an impedence mismatch between XML and the programming languages those communities use. Or to put it another way, processing XML in those languages is a constant pain in the neck.

You don't get that impedence mismatch if you use programming languages designed for XML, such as XSLT and XQuery - hence the advocacy for  "end-to-end XML" or "XRX" applications.

Conversely, you do still get an impedence mismatch if you use JSON with languages like XSLT and XQuery that were originally designed for XML. Even though XSLT and XQuery can now handle JSON, it's a bolt-on feature, and (as I showed in my paper for XML Prague 2016) if you try for example to do a recursive-descent transformation on maps-and-arrays using XSLT template rules, you discover that the easiest way to do it is actually to convert the data to XML first. Similarly, if you try reading and writing arrays (rather than sequences) using XQuery FLWOR expressions, you discover that it can be done, but it never feels completely natural.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.