OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] What are the practical, negative consequences of thinking that attributes are metadata?

> 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]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS