The basics of message translation
3 April 2006 — DanielAs we found out in our last exciting chapter, MXC is designed to accept messages in varying formats from various systems, validate, route and translate them into different formats, and send them on to other systems — hence the name MessageXchange (MXC for short).
Messages come in, in whatever format (XML, EDI, flatfile etc), by whatever transmission method (FTP, email, HTTP, X400 and others). If the message coming in is not XML, the first step is to translate it into XML, as MXC deals with XML internally.
Why XML? Because the technology behind MXC’s power is XSLT, which can be easily used to translate XML documents into other XML documents. XSLT (XSL Transformations) is an extension of XSL (eXtensible Stylesheet Language), commonly used to convert XML data into HTML web pages.
(It’s actually simplicity itself, if you’re the coding type, to grab your favourite programming tool and an XML parser and write up a simple program that can translate one XML document into another. Mind you, MXC has a lot of other smarts to do with configuration, logging, validation, transmission and more, so we don’t feel like we’re giving away any huge secret here.)
Translation of incoming messages to outgoing ones is conditional, that is, once the message is in XML form, tests are run on it using XSLT to determine if the message needs to be routed, and to which system(s) and formats. If the answer for a particular message to message combination is “True” another XSLT is used to translate it into its destination form. This gives total flexibility in configuring the source and destination messages, so any little intracacies in what the interfacing systems are sending or receiving can be implemented.
The XSLT is written by those configuring the system. It’s not particularly complex, and can be done by IT staff implementing MXC at their companies.
Or of course eVision’s highly trained, very brainy and professional staff can also do it. If the destination system is expecting a flatfile or some other non-XML formatted message, the MXC then converts the message as appropriate, before transmitting it out. XSLT resources:
- W3C: XSLT specification
- W3Schools: XSLT tutorial
- Wikipedia: XSLT (including simple examples)
- MXC help (browse through the topics starting with “What is a payload mapping?”)
