[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?
- From: Michael Kay <mike@saxonica.com>
- To: Eliot Kimber <ekimber@contrext.com>
- Date: Fri, 17 Feb 2017 10:33:51 +0000
>
> 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
Saxonica
- References:
- What are the practical, negative consequences of thinking thatattributes are metadata?
- From: "Costello, Roger L." <costello@mitre.org>
- Re: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Re: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- RE: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: "Costello, Roger L." <costello@mitre.org>
- Re: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: Rick Jelliffe <rjelliffe@allette.com.au>
- Re: [xml-dev] What are the practical, negative consequences of thinkingthat attributes are metadata?
- From: Thomas Passin <list1@tompassin.net>
- Re: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- Re: [xml-dev] What are the practical, negative consequences ofthinking that attributes are metadata?
- From: Eliot Kimber <ekimber@contrext.com>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]