Skip to Content

Use of XSLT mapping?

Hi,

I would like to know "what is the need of XSLT mapping?" and "In which scenario XSLT mapping is used?".

Thanks in advance.

Regards,

Archana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    Apr 19, 2006 at 06:50 AM

    When it is not possible to use message mapping (mainly when we need to create a hierarchy structure from a flat message etc) we prefer XSLT or JAVA mapping.

    XSLT works on the DOM parser and hence if the message size is high try avoiding it.

    REF:

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

    http://help.sap.com/saphelp_nw04/helpdata/en/83/2200cb50d345c793336d9a1683163e/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 19, 2006 at 06:51 AM

    Hi Archana,

    XSLT was made for mapping XML to HTML or XML to XML. In the XI environment there are different mappings XML to XML used: graphical (message) mapping, XSLT, Java and ABAP.

    XSLT is, compared to the other techniques, easy to learn and good to enhance. It has a worse performance than the other techniques.

    Usually it is the decion of the XI developer which mapping to use, but of course, you have to look to the requirements.

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Archana,

      XSLT mapping is generally done when you cannot run a scenario using Messag mapping which is always preferable.

      Some of the scenario's are:

      1. Nested structure: In case of multiple nested structure especially in ccase of IDocs, we use XSLT mapping

      2. Maintaining the sequence of the input structure: If you want to maintain the sequence of the data fromt he incoming file.

      Both the scnarios can also be done by Java mapping.

      Regards

      Vijaya

  • avatar image
    Former Member
    Apr 19, 2006 at 07:23 AM

    HI archana

    At the bottom of this page you can find the demo

    "An Overview of XSLT Mapping" and several other demos about XI.

    https://www.sdn.sap.com/irj/sdn/developerareas/java?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798 [original link is broken]

    Have fun.

    Go:khan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 19, 2006 at 08:00 AM

    Hi,

    XSLT is commonly used when you have complex structure or hierarchy and ypu want to retain the context of the data structure. Usage differs from scenario to scenario.

    Refer to w3school site for xsl details.

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

    Some of the functions are explained in the SDN TV demo on the following link.

    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#xi [original link is broken]

    Following has the example why XSLT was used.

    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters - IDoc to File

    Thanks,

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 19, 2006 at 08:40 AM

    Hi

    XSLT is use to convert an XML document to another document. This is achieved by using XSLT commands to search for tags in the source document and replacing them with other tags or values in the target document. The main advantage is it is also possible to switch to a Java program from XSLT.

    Please go through the weblogs:

    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3416. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

    Also go through the link:

    http://help.sap.com/saphelp_nw2004s/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm

    Regards

    Victoria

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 04, 2009 at 06:49 AM

    We can use XSLT mapping in the following cases:

    1. If we need mapping to be platform independent.

    For Eg: we can use XSLT mapping on any other middleware without making any changes to the code. This is not possible for JAVA or ABAP Mapping.

    2. In order to maintain heirarchy of the information/data.

    It is easy to maintain formatting of information using XML. We can use XSLT to maintain formatting of the information.

    • Performance of XSLT mapping is not as good as JAVA or ABAP Mapping.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 04, 2009 at 07:24 AM

    Hi Archana.....

    I had one scenario......data has to be selected from oracle table and it should be converted to MS Excel format and to be sent to mail.....

    To achive this i have used XSLT Mapping to cnvert xml format to Excel format based on the following blog.....

    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword

    Thanks,

    Sreedhar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 04, 2009 at 10:25 AM

    Hi ANu,

    We use an XSLT mapping when we cant acheive an mapping using graphical mappings.

    An mail adapter for sending the message where cascading style sheet can be

    applied or can be send as an attachment to the recipient

    its done in xslt_tool(se80) where we need to attach the xml message with the xsl

    language with special operators and imported into the Imported archives of IR.

    ---Sudhansu

    Add comment
    10|10000 characters needed characters exceeded