Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

This blog explains about XSLT mapping technique using stylus editor tool. Most of us would have came across the XI scenarios were you need to generate XML dynamically or some complex logic which cannot be implemented in XI graphical tool. You may need to use XSLT mapping, since XSLT is very open standard this blog will help performing simple xslt mapping.* *

Prerequisite

Stylus studio editor tool ( www.stylusstudio.com ; (http://www.stylusstudio.com/))

We are are going to transform the xml content from one format to another using XSLT mapping technology. The tool that we are going use in this scenario is stylus studio editor which can be downloaded from the site www.stylusstudio.com ; (http://www.stylusstudio.com/)  

Description

In this scenario we are going to convert xml which has material description in multiple languages. XSLT mapping will loop on those nodes and filters language 'EN' and generates the target XML node for that material description.

Copy the following XSD file content into your desktop which needs to imported into stylus studio for creating xslt mapping.

Source.XSD file  Target.XSD file  Step 1:

Open stylus studio editor and create a new XSLT mapper file as shown below

Step : 2

Add source.xsd and target.xsd as shown below

 !https://weblogs.sdn.sap.com/weblogs/images/251706810/2.jpg|height=496|alt=stylus 1|width=694|src=https://weblogs.sdn.sap.com/weblogs/images/251706810/2.jpg|border=0!

Step 3:

Map the 1:1 field as shown below

Step 4:

Loop on material text and filer out the material which has 'EN' as description. In order to perform looping right click on the center window of stylus editor and choose for each option

* Step 5:</p><p>Map the source and target field as shown below</p><p>!https://weblogs.sdn.sap.com/weblogs/images/251706810/5.jpg|height=372|alt=5|width=692|src=https://we...!</p><p>Step 6: </p><p>Include the if condition as shown below by clicking the for each block in the transformation</p><p>!https://weblogs.sdn.sap.com/weblogs/images/251706810/6.jpg|height=140|alt=6|width=331|src=https://we...!</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Xpath: a:Material/MATTEXT[LANGKEY = 'EN']  ( copy paste this expression)</p><p>Step 7:*

5 Comments