Data Mapping Using Xsl
Thought there are lots of ways to map information between partners, let me show you how it can be done using an XML mapping file. Let’s also considered that the incoming file is either’s XML or has been transformed to XML. I’ll now show you how an address id can be mapped to the complete address.
Lets consider that the Xml file that we get have the address id as shown
Now instead of the ident field inside the partyaddress something like this would be very useful
In order for us to map the ID to the address we need a mapping file. The actual mapping file could be something like the one shown below; this mapping file will be used in the xsl file to populate the address instead of the address ids.
Now the Xsl part, this is where the actual mapping is done. In the Xsl file create a variable that reads the mapping file like
Now to get the city mapped we could map it as shown above. Here the @id in the mapping file is compared with the ident field in the main xml file. If they are equal then we get the city name from the mapping file.