A slight detour: Why XML?
XML was invented as an “markup language”. Noting less and nothing more. XML might be OK, as an inter system “lingua franca” (universal language), in today’s SOA world, of high fashion. But… Big problem is that XML needs an especially tuned transport solution for a faster inter-system message transport. And no one yet has same up with an satisfactory solution for that. Compression wont do here, simply because software and time, is needed to compress/decompress every call/reply to/from xml. In all current SOA solutions, min 50% of the code and software layers is devoted to XML compression/decompression and coding/decoding. And do not forget to multiply that, with a number of different languages and runtime environments connected to the XML message bus.
And also: Why XSLT?
XML+XSLT is rendered as an over-engineered solution. Complex to use. and debugging is very difficult. XML+XSLT=HTML looked until recently as a “winning formula” … but in real life, this combination is difficult to use. This kind of development renders HTML designers job, almost impossible. Contrary to that, JSON+AJAX=HTML is not so mature (old?) but is much more natural fit, for HTML UI driven app’s. Outcome: this development is much less costly than XML+XSLT based one.
There is also a concept of XML serialization. Where run-time environment “contains” mechanisms for transforming XML to.from platforms native representation of objects. Some say that XML “serialization” delivers “natural solution” to the code/decode obstacle. Example is .NET with ‘attributes’ developed for that. But developers know it turns out to be anything but natural.
Formalisation of XML to JSON mapping
So, over there we have the conceptual formalization, to allow us to map “everything” from the XML to JSON.
Next page please.