Mapping is a core capability of integration
Figure M-1
To explain XML based mapping a distcinction needs to be made between Design Time and Runtime.
Each Data instance (.XML) can be described by a Meta Data instance, a XML schema (.XSD).
Ans XSLT is a definition of a mapping from an XML input (or multiple XML inputs) to one XML output. To be able to define a XSLT both the input and output Meta Data are necessary and the XSLT is described using the Meta Data.
An XSLT can also being used for HTML but we stick to XML for the usacase as described. Below and example created in Tibco BW where DATA as Meta Data of the input message is transformed to transformedData of the output message.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:template xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ActivityInput>
<body>
<transformedData>
<xsl:value-of select="upper-case($Rendezvous-Subscriber/ActivityOutput/body/DATA)"/>
</transformedData>
</body>
</ActivityInput>
</xsl:template>
Example M-1
XSLT comes OOTB (out of the box) with a series of XSLT functions and Tibco BW adds many moe functions. A capability as UTL-X has up to 650 stdlib functions. In the example above the funtion "upper-case" is used. It a string function which brings any string to upper-case in the transformation.
REMARK: for any implementation also the Init Time (start of a software solution) plays a imprtant role. This we'll explained further. One of the key capabilities is that the GLOMIDCO XBRL processor is using the three partition: Design-, Init- and Run- time.
At Design Time the Meta data needs to be known upfront. This contradicts the eXtionable capability of XBRL. For standard mapping, runtime extentions (expansions of the Meta Data) are bringing an information model paradox: What is not know at Design Time, cannot easility being mapped to any Meta Data and runtime the added data + Meta Data cannot being used. Best case is to deiscard or tag the expansions as unknown.
Figure M-2 Mapping with input and output validation added
JSON mapping capabilities are limited compared to XML mapping capabilities. Also Validation in JSON is not as strong and rich as validation of XML. However many processes are using JSON messages. Tools like JSONATA, JQ can do a JSON 2 JSON mapping.
UTL-X is open source an freely available and usable for any kind of mapping.
Also tools like Dataweave (Salesforce propriety) are Functional mapping capabilities.They allow XML + JSON -> JSON, XML+JSON -> XML and also taking CSV and YAML files as transmitter for messageing in the mapping.
Figure M-7 JSON 2 JSON mapping
Figure M-8 Multiple input (CSV or XML or JSON or YAML) to one output format mapping