Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

My first thought

For a mental image of XSLT, the first thing that sprang to mind when reading your post was the council chamber at the European Union, or the debating halls at United Nations.

If you've ever seen news footage of those places when a well supported debate is in full flow and seen the army of translators running around whispering on-the-fly translations into the ears of the delegates, observed the confusion on those delegates faces as they get miss-predicted or misinterpreted native language translation of the current speakers words, followed (hopefully) by the dawning of realisation as the translations are corrected in real-time. Seen their initial reactions of confusion or disgust turn to realisations of understanding and joy -- or vice versa -- then you may understand my mental picture.

I've seen various attempts at defining a common language for computer systems intercommunication that have been forthcoming over the years. Unfortunately, like Esperanto, nobody ever quite talks them the same way. Each native (proprietary!) speaker has the habit of imposing their own native dialect upon the basic structure and semantics of the language. Each tries to use and extend the use of the "common language" to incorporate and reflect the semantic variety, expressiveness and beauty of their own native language. The result is that they end up speaking as many dialects of the common language as there are native languages -- and often more, as each individual 'native-X' speaker tends to enhance their vocabulary in different ways.

A second view

For a second mental image, I go back to an unscheduled stop-over I made in New Delhi, India a few years ago. I was on a flight from Hong Kong back to the UK that was meant to touch down at New Delhi, re-fuel, exchange a few passengers and fly on. Four of the 16 main tyres on the jumbo jet burst upon landing and they didn't have replacements to hand, so we ended up being forced to spend the night and the following day in local hotels whilst replacements where flown in.

In most ways, this was a delightful and pleasurable experience as the hotels were superb, the cuisine excellent and the local people as interesting and friendly as they were diverse. There was one fly-in-the ointment. None of we transit passengers had the requisite visas for entry to the sub-continent, and so, for security reasons, our passports were taken from us at the airport prior to being bussed to our hotels. Theoretically, this meant we were confined to our hotels for the duration, but most of us found that a few English pounds or US dollars would hire us a taxi for the day, and we went out in small groups and got to see some of the local sites, markets and so forth. Great fun. The problem arose when we returned to the airport the following evening.

We were assembled in a large room in order to have our passports returned and to go through the customs and 'emigration' procedures. A very pleasant Indian Customs official, complete with a uniform that wouldn't have looked out of place on the Captain of the Titanic turned up after about an hour (a short delay by sub-continental standards:), and announced that he had our passports. Three, somewhat less resplendently dressed sub-officals came in with 4 large black bin bags containing the 300+ (from 20+ countries) passports. These were placed upon a large trestle table erected for the purpose and the official proceeded to reach into the first bag, remove a passport, open the cover and read out the name of the owner who was to move forward, be identified and retrieve their passport.

The problem was that with the nice officials fairly strong subcontinental accent, names (often phonetic translations) from 20 odd countries ranging from China, Malaysia, Australia & New Zealand through Abu Dhabi, Bahrain and Egypt, to Sweden, France, Greece, Spain and the UK, the pronunciations left something to be desired. Hearing and interpreting your own name when spoken by a non-your-language speaker is itself quite difficult, but when your surrounded by 300 other non-native speakers all questioning each other as to whether that last, staccato collection of consonants intermingled with sing-song vowel sounds was their name or not, it became incredibly confusing and difficult. It got worse -- much worse -- and the flight eventually took off some 5-hours later, but the rest of the story doesn't have relevance :)

I guess my point is that I've seen various attempts at providing a common, platform-independant mechanism for communications between systems, and so far none of them really live up to the hype. I fully understand the need for such an animal and support the aims, but the implementations leave so much to be desired. The problem is that you either end up with the lowest common denominator which results in complex and sophisticated systems talking to each other in terms of simplistic, verb-adverb-adjective sentences, which is a bit like a Russian and Chinese nuclear scientists communicating to each other via English baby-talk. Or you get a intermediate communications protocol that is so complex, as to allow the most sophisticated ideas and concepts from any proprietary system to be communicated to any other. A fully-defined, orthogonal and extensible protocol -- like XSLT.

The result is that every communicator has to implement detection and recovery procedures for every conceivable language construction, even if it will never use those constructions itself, or would be capable of processing them if it received them. That often leads to the situation where it becomes policy for companies and organisations to adopt such protocols "for all inter-systems communications", even when those systems are their own, similar, never-will-talk-to-the-outside-world, systems. This imposes a huge burden on both the development and runtime for these systems and can lead to dumbing down or castration of individual systems design, because the need to be able to translate all internal data structures and concepts into the intermediate protocol prevents unique and complex (but fitting) structures and concepts being used.

A final image

For a final image, imagine a brain surgeon trying to perform his trade using 30 foot long poles to prod the lower-lumbar regions of proxy-surgeons that enter commands on keyboards that control industrial robots that actually perform the brain surgery.

Trying to perform many of the types of transformations required by inter-systems communication -- date-format; numeric-format; case, codepage and language conversions etc. bits and bytes stuff that most computer systems handle easily and efficiently -- using a "program" written in XML, seems somewhat analogous :)

As you might have gathered, I'm not particularly impressed by XSLT. I see the need for it in some particular circumstances, but in 90% of cases, there is no need to divorce the logic from the underlying systems quite so completely. Most concepts in computers are transferable between individual systems without resorting to a protocol that is so far removed from the underlying mechanisms. For the 10% that do require such machinations, there has to be a better way. I don't know it yet, but I'm pretty sure it will be along some time soon :)

My conclusion is that you shouldn't resort to such mechanisms unless you have a real need to, and if you have, I commiserate with you.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail


In reply to Re: What's Your Mental Image of XSLT? by BrowserUk
in thread What's Your Mental Image of XSLT? by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-23 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found