cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Meterial

Former Member
0 Kudos

Hi SDN Guru's

I need to learn XSLT progarmming.

Please give me some meterials or links to get start study

XSLT (mapping).

Thank very much your help in advance.

Thanks

Balaprasad

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Dear Bala,

Try ALTOVA Map Force software to better implement what you learn.

I found many but this works good for me..

best Regards

Praveen

Former Member
0 Kudos

Hi Bala Prasad Howde Kari ,

The following websites contain excellent PDF docs on XSLT :

Generic XSLT Mapping for SAP XI,Part I

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2e...

Generic XSLT Mapping for SAP XI,Part II

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923...

XSLT: Recursive Templates

/people/udo.martens/blog/2006/04/26/xslt-recursive-templates

Easy RFC lookup from XSLT mappings using a Java helper class

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc...

cheers!

gyanaraj

****Pls reward points if u find this helpful

Former Member
0 Kudos

Hi,

Apart from above links go through these links also

Learn XSLT

www.w3schools.com

XSLT mapping scenario

http://www.saptechnical.com/Tutorials/XI/XSLT/page1.htm

Thanks

Vikranth

GabrielSagaya
Active Contributor
0 Kudos

XSLT mapping

************

A few example in which an XSLT mapping can be used:-

When the required output is other than XML like Text, Html or XHTML (html displayed as XML)

When default namespace coming from graphical mapping is not required or is to be changed as per requirements.

When data is to be filtered based on certain fields (considering File as source)

When data is to be sorted based on certain field (considering File as source)

When data is to be grouped based on certain field (considering File as source)

Advantages of using XSLT mapping

XSLT program itself defines its own target structure.

XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.

XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.

File content conversion at receiver side can be avoided in case of text or html output.

Multiple occurrences of node within tree (source XML) can be handled easily.

XSLT can be used in combination with graphical mapping.

Multi-mapping is also possible using xslt.

XSLT can be used with ABAP and JAVA Extensions.

Disadvantages of using XSLT mapping

Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).

Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.

XSLT mapping requires more memory than mapping classes generated in Java.

XSLT program become lengthier as source structure fields grows in numbers.

XSLT program sometimes become complex to meet desired functionality.

Some XSL functions are dependent on version of browser.

XSLT mapping

/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping

Former Member
0 Kudos

Hey ,

You can get everything from W3schools.com.

http://www.w3schools.com/xsl/default.asp

Thanks,

Vijaya.

Former Member
0 Kudos

HI

Step u2013 By u2013 Step Simple Approach for XSLT Mapping

/people/aashish.sinha/blog/2008/01/17/step-150-by-150-step-simple-approach-for-xslt-mapping

http://www.w3schools.com/XSL/xsl_intro.asp

XSLT: Extensible style sheet language transformation. It enables the definition of mappings for messages with different structures. Provides the transformation requirements for an inbound message to create an outbound message.

XSLT MAPPING:

Steps required for developing XSLT Mapping

u2022 Create a source data type and a target data type

u2022 Create Message types for the source and target data types.

u2022 Create Message Interfaces includes Inbound Message interface and Outbound Message interface.

u2022 XSLT Mapping does not require creation of Message mapping, so donu2019t create any Message mapping.

u2022 Create an .XSL file which converts source data type into target data type.

u2022 Zip that .xsl file and import it into Integration Repository under Imported Archives.

u2022 In Interface Mapping choose mapping program as XSL and specify this zip program. (Through search help you will get XSL Mapping programs that you imported under Imported Archives, select your corresponding XSL Program)

u2022 Test this mapping program by navigating to Test tab.

By having look at above steps you can easily find out that this mapping is no where different from other mapping programs, here the challenging lies in creating an XSLT file. If you spend couple of minutes in studying XPATH tutorial you would be in ideal position to create an XSL Transformation (.xsl extension).

If you still find difficulties in generating XSL Transformation, then you can make use of a tool u201CAltova MapForceu201D which will create XSL file for you.

Steps for creating XSL file using this tool:

1. Open the Alto MapForce, import the source .xml and .xsd file in it

2. Similarly import the target .xml and .xsd in MapForce.

3. These two data files should match with source and target data types in Integration Repository.

4. Complete the graphical mapping using extensive list of XSLT functions available there.

5. Save the mapping file.

6. Click the XSLT tab. You will have the entire xslt logic there.

7. Copy that content and save it as .xsl file.

8. Zip above .xsl file and import the same into IR under Imported Archives

XSLT MAPPING:

Generic XSLT Mapping for SAP XI,Part I

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2e...

Generic XSLT Mapping for SAP XI,Part II

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923...

XSLT: Recursive Templates

/people/udo.martens/blog/2006/04/26/xslt-recursive-templates

Easy RFC lookup from XSLT mappings using a Java helper class

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc...

cheers

Edited by: vemuganti naga phalguna on Jun 26, 2008 3:21 PM

Former Member
0 Kudos

Hi,

What is XSLT

XSLT stands for EXtensible Stylesheet Language Transformations. It is an XML based language for transforming XML documents into any other formats suitable for browser to display, on the basis of set of well-defined rules.

It can be used to transform

u2022XML to XML - From one XML data format to another

u2022XML to Text

u2022XML to HTML/XHTML

u2022XML to PDF

Pre-requisite for XSLT

Writing an XSL program to transform XML document into desired format is not a difficult task though it seems to be in the beginning. It requires basic knowledge of XML tags, basic XPath concepts and HTML.

We will concentrate more on use of XSLT in XI (EXchange Infrastructure) for mapping.

Before starting with XSLT letu2019s get familiar with the following terms:-

u2022XML

u2022HTML

u2022XPath

XSLT: Extensible style sheet language transformation. It enables the definition of mappings for messages with different structures. Provides the transformation requirements for an inbound message to create an outbound message.

XSLT mappings can be imported into the Integration Repository; java methods can be called from within the XSLT style sheet. Advantages of this mapping are: open standard, portable, extensible via Java user-defined functions.

XSLT MAPPING:

Steps required for developing XSLT Mapping

u2022 Create a source data type and a target data type

u2022 Create Message types for the source and target data types.

u2022 Create Message Interfaces includes Inbound Message interface and Outbound Message interface.

u2022 XSLT Mapping does not require creation of Message mapping, so donu2019t create any Message mapping.

u2022 Create an .XSL file which converts source data type into target data type.

u2022 Zip that .xsl file and import it into Integration Repository under Imported Archives.

u2022 In Interface Mapping choose mapping program as XSL and specify this zip program. (Through search help you will get XSL Mapping programs that you imported under Imported Archives, select your corresponding XSL Program)

u2022 Test this mapping program by navigating to Test tab.

By having look at above steps you can easily find out that this mapping is no where different from other mapping programs, here the challenging lies in creating an XSLT file. If you spend couple of minutes in studying XPATH tutorial you would be in ideal position to create an XSL Transformation (.xsl extension).

If you still find difficulties in generating XSL Transformation, then you can make use of a tool u201CAltova MapForceu201D which will create XSL file for you.

Steps for creating XSL file using this tool:

1. Open the Alto MapForce, import the source .xml and .xsd file in it

2. Similarly import the target .xml and .xsd in MapForce.

3. These two data files should match with source and target data types in Integration Repository.

4. Complete the graphical mapping using extensive list of XSLT functions available there.

5. Save the mapping file.

6. Click the XSLT tab. You will have the entire xslt logic there.

7. Copy that content and save it as .xsl file.

8. Zip above .xsl file and import the same into IR under Imported Archives

For XSLT Mapping:

http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm

Error handling in XSLT Mapping:

http://help.sap.com/saphelp_nw04/helpdata/en/8a/7672f7d7e444439fd7024f806221a4/frameset.htm

XSLT MAPPING:

Generic XSLT Mapping for SAP XI,Part I

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2e...

Generic XSLT Mapping for SAP XI,Part II

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923...

XSLT: Recursive Templates

/people/udo.martens/blog/2006/04/26/xslt-recursive-templates

Easy RFC lookup from XSLT mappings using a Java helper class

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc...

Step u2013 By u2013 Step Simple Approach for XSLT Mapping

/people/aashish.sinha/blog/2008/01/17/step-150-by-150-step-simple-approach-for-xslt-mapping

Thanks,

RamuV

Former Member
0 Kudos

Hi,

You can find many documents related to XSLT here...

http://www.esnips.com/_t_/XSLT?q=XSLT

Regards,

Vivek LR