Altova Mapforce – XML Field Mapping
Altova MapForce must be one of the best and easiest ways to map from one XML document to another using the documents Stylesheet.
Below is a simple mapping from one XML to a new XML structure.
Master File : First import the xsl file to be used as master, you will be prompted to browse for a XML file that successfully maps to the xsl.
Mapped File: Import the xsl of the mapped file and skip to select a XML file as a new XML file will be created after the mapping has been completed.
Drag and drop the one field from the Master to Mapped file. There is also a range of built in String, Math and XPath2 functions to be imported (dragged and dropped) to execute different actions.
The XML output for from the Mapping looked like the following:
MapForce creates detailed report for every mapping. Following file was created by MapForce:
After map has been created it is possible to generate the code in XSLT1.0 or XSLT2.0…event Java. This is how the XSLT2.0 code looks for mapped file.
It also created a bat file which you can call everytime you want a mapping to execute:
AltovaXML /xslt1 “MappingMapToExpReport-Target.xslt” /in “C:/Documents and Settings/Administrator/My Documents/Altova/MapForce2010/MapForceExamples/Tutorial/mf-ExpReport.xml” /out “C:/Documents and Settings/Administrator/My Documents/Altova/MapForce2010/MapForceExamples/Tutorial/ExpReport-Target.xml” %*
IF ERRORLEVEL 1 EXIT/B %ERRORLEVEL%
I think it a great tool…would be nice if it could do industry standard transformations like HL7 and EDIFACT.