Skip to Content

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

Stulus stido

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

3

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

4

* 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://weblogs.sdn.sap.com/weblogs/images/251706810/5.jpg|border=0!</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://weblogs.sdn.sap.com/weblogs/images/251706810/6.jpg|border=0!</p><p style=”margin: 0in 0in 0pt” class=”MsoNormal”>Xpath: a:Material/MATTEXT[LANGKEY = ‘EN’]  ( copy paste this expression)</p><p>Step 7:*

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

      1. naveen chitluri
        I installed both “STYLUS studio XML Enterprise” and “STYLUS studio XML Profession” trial versions.
        I dont find XSLT mapper in them. Any idea?
        (0) 

Leave a Reply