Error with XSLT mapping .. code included

I am using XSLT to map my input legacy message into the CATS_INSERT02 IDoc. I am getting a wierd error ....
=====================================================
<Trace level="1" type="T">TransfromerException during XSLT processing:</Trace>
  <Trace level="1" type="T">javax.xml.transform.TransformerException: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:245) at com.sap.aii.ibrun.server.mapping.MappingTransformer.transform(MappingTransformer.java:153) at com.sap.aii.ibrun.server.mapping.XSLTMapping.executeStep(XSLTMapping.java:67) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:91) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:77) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:88) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:63) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:80) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0.processFunction(MappingServiceObjectImpl0.java:131) at sun.reflect.GeneratedMethodAccessor20721.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy26.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:95) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:171) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162) Caused by: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8) at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:1988) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2632) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2688) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:126) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:136) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:209) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:341) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:234) ... 24 more -
com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8) at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:1988) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2632) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2688) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:126) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:136) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:209) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:341) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:234) at
I am able to test the transform fine in XMLSpy. Any ideas will be really appreciated.
=====================================================
XSL code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:attribute-set name="idoc_begin">
          <xsl:attribute name="BEGIN">catsdb_test</xsl:attribute>
     </xsl:attribute-set>
     <xsl:attribute-set name="EDIDC">
          <xsl:attribute name="SEGMENT">EDI_DC40</xsl:attribute>
     </xsl:attribute-set>
     <xsl:attribute-set name="E1CATS_INSERT">
          <xsl:attribute name="SEGMENT">E1CATS_INSERT</xsl:attribute>
     </xsl:attribute-set>
     <xsl:attribute-set name="E1BPCATS1">
          <xsl:attribute name="SEGMENT">E1BPCATS1</xsl:attribute>
     </xsl:attribute-set>
     <!-- Groupby each UNIQUE SSN in EMPDETL -->
     <xsl:key name="employees-by-ssn" match="EMPDETL" use="ssn"/>
     <xsl:template match="EMPDET">
          <!-- Insert the ROOT element -->
          <xsl:element name="CATS_INSERT02">
               <!-- loop through all the employee detail nodes using the SSN as the key -->
               <!-- <xsl:for-each select="EMPDETL"> -->
               <xsl:for-each select="EMPDETL[count(. | key('employees-by-ssn', ssn)[1]) = 1]">
                    <!-- sort using the SSN after grouping the data based on SSN in the step earlier -->
                    <xsl:sort data-type="text" select="ssn"/>
                    <!-- create an IDOC and EDI_DC40 per SSN grouping  -->
                    <xsl:element name="IDOC" use-attribute-sets="idoc_begin">
                         <xsl:element name="EDI_DC40" use-attribute-sets="EDIDC">
                              <xsl:element name="TABNAM">EDIDC</xsl:element>
                              <xsl:element name="DIRECT">2</xsl:element>
                              <xsl:element name="IDOCTYP">cats_insert02</xsl:element>
                              <xsl:element name="MESTYP">cats_insert</xsl:element>
                              <xsl:element name="SNDPOR">T90CLNT090</xsl:element>
                              <xsl:element name="SNDPRT">LS</xsl:element>
                              <xsl:element name="SNDPRN">T90CLNT090</xsl:element>
                              <xsl:element name="RCVPOR">SAPBAS</xsl:element>
                              <xsl:element name="RCVPRN">ERPCLT800</xsl:element>
                         </xsl:element>
                         <!-- EDI_DC40 element -->
                         <xsl:element name="E1CATS_INSERT" use-attribute-sets="E1CATS_INSERT">
                              <xsl:for-each select="key('employees-by-ssn', ssn)">
                                   <!-- Create as many E1BPCATS1 segments as the number of times each SSN is repeated -->
                                   <xsl:element name="E1BPCATS1" use-attribute-sets="E1BPCATS1">
                                        <xsl:element name="WORKDATE">xsl:value-of select="workdate"</xsl:element>
                                        <xsl:element name="EMPLOYEENUMBER">xsl:value-of select="ssn"</xsl:element>
                                        <xsl:element name="ABS_ATT_TYPE">xsl:value-of select="abstype"</xsl:element>
                                        <xsl:element name="WAGETYPE">xsl:value-of select="wagetype"</xsl:element>
                                        <xsl:element name="CATSHOURS">xsl:value-of select="catshours"</xsl:element>
                                   </xsl:element>
                                   <!-- E1BPCATS1 element -->
                              </xsl:for-each>
                              <!-- End of loop for E1BPCATS1 -->
                         </xsl:element>
                         <!-- E1CATS_INSERT element -->
                    </xsl:element>
                    <!-- IDOC element -->
               </xsl:for-each>
               <!-- End of loop for all the employee detail nodes -->
          </xsl:element>
     </xsl:template>
</xsl:stylesheet>

what is correlation here?
I have three messages coming into BPM....now all the three messages should have a field (any field) whose value will be the same in all the messages.
Ex:
<Message1>
<Name>SAP</Name>
<ID>40</ID>
</Message1>
<Message2>
<Name>SDN</Name>
<ID>40</ID>
</Message2>
<Message3>
<Name>FORUM</Name>
<ID>40</ID>
</Message3>
Now to correlate the above messages, the field ID would be used as it has the same value in all the messages.
How does message mapping looks for the following messages
In your BPM you will have a Transformation step....the mapping included here will have three source messages (File1, File2, File3) and there will be a single target message which will have the below structure:
<ROOT>
<OUTPUT> ...... 0..unbounded
</ROOT>
OUTPUT node of the target should be duplicated (right-click --> duplicate ... in message mapping).....do it twice so that you will have three OUTPUT nodes.
Now each target-OUTPUT node should be mapped to the source OUTPUT node, respectively.
Regards,
Abhishek.

Similar Messages

  • XSLT mapping code for N:1 mapping

    Hi Guys,
    I have got one scenario to collect 5 files to merge as one. To this scenario I want to use N:1 mapping. If I am not wrong, with XSLT mapping is easiest way to do this, please correct me if I am wrong. Can any one provide some links or code to merge these files into one.
    Thanks in advance.
    San

    what is correlation here?
    I have three messages coming into BPM....now all the three messages should have a field (any field) whose value will be the same in all the messages.
    Ex:
    <Message1>
    <Name>SAP</Name>
    <ID>40</ID>
    </Message1>
    <Message2>
    <Name>SDN</Name>
    <ID>40</ID>
    </Message2>
    <Message3>
    <Name>FORUM</Name>
    <ID>40</ID>
    </Message3>
    Now to correlate the above messages, the field ID would be used as it has the same value in all the messages.
    How does message mapping looks for the following messages
    In your BPM you will have a Transformation step....the mapping included here will have three source messages (File1, File2, File3) and there will be a single target message which will have the below structure:
    <ROOT>
    <OUTPUT> ...... 0..unbounded
    </ROOT>
    OUTPUT node of the target should be duplicated (right-click --> duplicate ... in message mapping).....do it twice so that you will have three OUTPUT nodes.
    Now each target-OUTPUT node should be mapped to the source OUTPUT node, respectively.
    Regards,
    Abhishek.

  • Possible with XSLT mapping?

    Hi,
    I have source xml structure of format
    <Header fld1 fld2 fld3
    fld4 fld5 fld6  ><line   fld7 fld8 fld9 </line></header>
    Header occurence is 1---unbounded
    and line occurence is 0---unbounded
    and line items can exist or not for some header items.for some headers items can be single or multiple.
    I get xml files on sender side and need to convert to flat files ,so I am using sender file CC on sender and receiver file CC with FCC on the receiver side.
    I am able to get with receiver file FCC ,I know FCC can support two level heirarchies only.
    header1
    header2
    header3
    header n
    line x
    line y
    line z
    line n
    so i dont know to which header values the item values belong to.I need to get
    this structure
    header1....(if no items)
    header2....(let say 2 items)
    linex
    liney
    header3...(no items)
    header4....(one item)
    linez
    header n.....(again no items)
    so I have another Xi guy,he told me that we can achieve this by using a XSLT mapping rather than gaphical mapping which I am using now.
    so can we get the structure what I wanted with XSLT mapping or is it nothing with mapping and it is with adapter?(I think its nothing with mapping)
    I know we may get the required output structure by writing a module program and call that in the receiver file adapter.
    suggestions please.
    thank you,
    regards,
    Babu

    udo,
    sorry if I put in confusion with my structures of both source and target.I am trying to give little eloberate
    I have source  xml data like this.
    <Header1 fld1=1234 fld2="name1" fld3='SAP1"
    fld4='000" fld5=0 fld6="sdn1"</header>...............no line items here
    <Header2 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value1 fld8=value2 fld9=value3 /line><line fld7=value4 fld8=value5 fld9=value6 /line></header>.....two line items here
    <Header3 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value7 fld8=value8 fld9=value9 /line></header>......one line item here
    Header4 fld1=12345 fld2="name2" fld3='SAP2"
    fld4='0006" fld5=01 fld6="sdn2"</header>.......no line items here
    I want target flat file structure like this considering "~" (tild)as delimiter
    1234name1SAP100000~sdn1 ...................> flatfile values for header1(no item values for this header1)
    123nameSAP000~sdn..........................> flat file values for hader2
    value1value2value3...........................>line item values for header2
    value4value5value6...........................>line item values for header2(two line item values for this header2)   
    123nameSAP000~sdn..........................>values for hader3
    value7value8value9...........................>line item values for header3(one item values for this header3)
    12345name2SAP2000601~sdn2..................>values for header4(no item values for this header4)
    ................... like for n header values.

  • Idoc with XSLT Mapping ALE service error

    Hi all,
    I have the same problem with "converting to an ALE logical system".
    In this case I have a Business System without logical system name in the SLD. This information for the IDoc control record, like SNDPOR, I will map with a xslt mapping.
    In weblogs from Michael are the properties for the directory described.
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    I selected in the comminication channel the last two check boxes, as described in SAP help.
    "Take Sender from Payload
    If you want to take the sender of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
    If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
    Take Receiver from Payload
    If you want to take the receiver of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
    If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
    If you set both of the above indicators, you do not require a heading mapping and do not need to set the alternative identifiers.
    However, you must ensure that the SNDPRN, SNDPRT, RCVPRN, and RCVPRT fields are set in the IDoc control record.
    Setting the senders and receivers of a message from the payload simplifies configuration and speeds up processing.
    If the sender and receiver are not set correctly in the payload, the resulting error is only visible in the receiving system. "
    In my XSLT-Mapping I set the appropriate Idoc fields:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:preserve-space elements="*"/>
    <xsl:template match="DATEN">
    <_-XXX_-018_XXXXX_XIDATEN>
    <IDOC>
    <xsl:attribute name="BEGIN">1</xsl:attribute>
    <EDI_DC40>
    <xsl:attribute name="SEGMENT">1</xsl:attribute>
    <TABNAM>EDI_DC40</TABNAM>
    <DOCREL></DOCREL>     
    <DIRECT>2</DIRECT>
    <IDOCTYP>_-XXX_-018_XXXXX_XIDATEN</IDOCTYP>
    <MESTYP>_-XXX_-018_XXXXX_XIDATEN</MESTYP>
    <SNDPOR></SNDPOR>
    <SNDPRN>XXXXX01IN</SNDPRN>     
    <SNDPRT>LS</SNDPRT>
    <RCVPOR>xxx</RCVPOR>
    <RCVPRN>xxx</RCVPRN>
    <RCVPRT>LS</RCVPRT>
    </EDI_DC40>
    <xsl:variable name="pid" select="substring(.,1,1)"/>
    But in the sxmb_moni the message is red with the error message :" converting to an ALE logical system"
    Have you any idea?
    With another interface I used a graphic Mapping and the same properties in the directory and it works.
    Bye
    Stefan

    Hi togehter,
    it works now, after cpa_cache and sxi_cache.
    and and ...
      <IDOCTYP>/XXX/018_XXXXX_XIDATEN</IDOCTYP>
      <MESTYP>/XXX/018_XXXXX_XIDATEN</MESTYP>
    Without: _-...
    I would write a blog.
    Does know one how that goes here?
    Thanks
    SDN is great
    Stefan

  • XSLT mapping code to replace ns1: tag as plm: in XML file in PI mapping

    Hi
    I am sending XML file to HTTP server as below format
    <?xml version="1.0" encoding="UTF-8" ?>
       - <ns1:Responses xmlns:ns1="http://">
    -    <ns1:Response Application="SAP">
        <ns1:field1>12345</ns1:field1>
        <ns1:field2>abc</ns1:field2>
       - <ns1:Items>
        <ns1:doc></ns1:doc>
      </ns1:Items>
      </ns1:Response>
      </ns1:Responses>
    i hve to replace <ns1: as <plm:, i could able to delete <ns1: tag uisng XSLT mapping(in sdn), but i dont know how to add tag with <plm:
    Hi XSLT experts/if any has come across this requirment, please send XSLT code to add tag in XML.
    Regards,
    Rajesh

    No need for XSLT, just use the XMLAnonymizerBean module in your receiver communication channel.
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d169186a29570ae10000000a114a6b/frameset.htm
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    If your receiver CC cannot process modules (ABAP receiver, for example), in your XSLT just define the target namespace with the desired prefix.
    Regards,
    Henrique.

  • Error in XSLT Mapping when special character is passed through

    Hi Experts,
    We have used the XSLT mapping. When ever any special character like é is being passed, then the below mentioned error is displayed in the Integration engine.
    Error occurred during XSLT mapping of the application
    It is working fine with normal case if we are not sending any special character.
    I am not sure whether the problem exists in XSLT mapping or the issue with the legacy system?
    Early response would be highly appreciated and points will be awarded.
    Thanks in Advance,
    Jitender

    hi,
       [Problem in transforming XML to string using XSLT;
    Chk the above link.might solve ur issue.
    Regards.
    Siddhesh Naik

  • Need Help with XSLT Mapping....

    My scenario is synchronous scenario. SAP(Proxy) to XI to WebServer(SOAP)
    The response is coming back in asingle ANY field and so I guess I need XSLT Mapping to map it to the response message going  backto SAP.
    The response sent by webserver is of the structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <GetStudentsExResponse xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/LMSWebSvc/LMS_Interface">
       <GetStudentsExResult>
          <Courses xmlns="">
             <Warnings/>
             <Course CourseName="Requal RWT with Instructional Blocks TEST" CourseId="1325">
                <Student LastName="LMSTest" FirstName="A" SSN="112345678" LoginID="lms123456a" CompanyName="LMS Test" CourseStatus="P" CourseStatusDate="03/14/2007 09:24:36" CourseScore="90">
                   <Lesson LessonCode="1915" LessonName="RWT Part 1"/>
                   <Lesson LessonCode="1916" LessonName="RWT Part 2"/>
                   <Lesson LessonCode="1917" LessonName="RWT Requal Exam" LessonStatus="p" LessonStatusDate="03/14/2007 09:24:36" LessonScore="90" ProctorID="1" ProctorName="Account Default">
                      <ExamInteractions QuesNum="17758" StudentResp="D" CorrectResp="D" Judged="c"/>
                      <ExamInteractions QuesNum="17769" StudentResp="B" CorrectResp="C" Judged="w"/>
                      <ExamInteractions QuesNum="8465" StudentResp="A" CorrectResp="A" Judged="c"/>
                      <ExamInteractions QuesNum="8471" StudentResp="A" CorrectResp="A" Judged="c"/>
                      <ExamInteractions QuesNum="8496" StudentResp="C" CorrectResp="C" Judged="c"/>
                      </Lesson>
                </Student>          
             </Course>
          </Courses>
       </GetStudentsExResult>
    </GetStudentsExResponse>
    The Structure that I need to map this to is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Course_Response_MT xmlns:ns0="urn:sce-com:xi:fi:goyala">
       <GetStudentsExResponse>
          <GetStudentsExResult>
             <Courses>
                <Course>
                   <CourseName/>
                   <CourseID/>
                   <Student>
                      <LastName/>
                      <FirstName/>
                      <SSN/>
                      <LoginID/>
                      <CourseStatus/>
                      <CourseStatusDate/>
                      <CourseScore/>
                      <Lesson>
                         <LessonCode/>
                         <LessonName/>
                         <LessonStatus/>
                         <LessonStatusDate/>
                         <ExamInteractions>
                            <QuesNum/>
                            <StudentResp/>
                            <CorrectResp/>
                            <Judged/>
                         </ExamInteractions>
                      </Lesson>
                   </Student>
                </Course>
             </Courses>
          </GetStudentsExResult>
       </GetStudentsExResponse>
    </ns0:Course_Response_MT>
    and  the xslt mapping that I have written for this is:
    <?xml version='1.0' encoding='utf-8' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:sce-com:xi:fi:goyala" xmlns:DateUtils="com.sce.hcm.xi.util.DateUtils">
         <xsl:template match="/">
              <a:Course_Response_MT>
                   <GetStudentsExResponse>
                        <GetStudentsExResult>
                             <Courses>
                                  <CourseName>
                                       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course[@CourseName]"/>
                                       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course[@CourseID]"/>
                                       <Student>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@LastName]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@FirstName]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@SSN]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@LoginID]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@CourseStatus]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@CourseStatusDate]"/>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student[@CourseScore]"/>
                                            <Lesson>
                                                 <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson[@LessonCode]"/>
                                                 <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson[@LessonName]"/>
                                                 <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson[@LessonStatus]"/>
                                                 <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson[@LessonStatusDate]"/>
                                                 <ExamInteractions>
                                                             <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions[@QuesNum]"/>
                                                             <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions[@StudentResp]"/>
                                                             <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions[@CorrectResp]"/>
                                                                   <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions[@Judged]"/>
                                                 </ExamInteractions>
                                            </Lesson>
                                       </Student>                                   
                                  </CourseName>
                             </Courses>
                        </GetStudentsExResult>
                   </GetStudentsExResponse>                                        
              </a:Course_Response_MT>
         </xsl:template>
    </xsl:stylesheet>
    But This mapping is not working...  I am getting errors...
    Pls advice, this is urgent..
    Regards,
    XIer
    Edited by: XIer on Apr 25, 2008 12:23 PM
    Edited by: XIer on Apr 25, 2008 12:37 PM
    Edited by: XIer on Apr 25, 2008 12:37 PM

    Hi All,
              I have now modified my XSLT Mapping as :
    <?xml version='1.0' encoding='utf-8' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:sce-com:xi:fi:goyala" xmlns:DateUtils="com.sce.hcm.xi.util.DateUtils">
         <xsl:template match="/">
              <a:Course_Response_MT>
                   <GetStudentsExResponse>
                   <xsl:value-of select="a:GetStudentsExResponse"/>
                        <GetStudentsExResult>
                        <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult"/>
                             <Courses>
                             <xsl:for-each select="a:GetStudentsExResponse/GetStudentsExResult/Courses">
                                  <Course>
                                   <CourseName>
                                       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/@CourseName"/>
                                       </CourseName>
                                       <CourseID>
                                       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/@CourseID"/>
                                       </CourseID>
                                       <xsl:for-each select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student">
                                       <Student>
                                       <LastName>
                                            <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@LastName"/></LastName>
                                       <FirstName>     <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@FirstName"/></FirstName>
                                            <SSN><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@SSN"/></SSN>
                                            <LoginID><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@LoginID"/></LoginID>
                                            <CourseStatus><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@CourseStatus"/></CourseStatus>
                                            <CourseStatusDate><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@CourseStatusDate"/></CourseStatusDate>
                                            <CourseScore><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/@CourseScore"/></CourseScore>
                                            <xsl:for-each select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson">
                                            <Lesson>
                                                 <LessonCode><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/@LessonCode"/></LessonCode>
                                                 <LessonName><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/@LessonName"/></LessonName>
                                                 <LessonStatus><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/@LessonStatus"/></LessonStatus>
                                                 <LessonStatusDate><xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/@LessonStatusDate"/></LessonStatusDate>
                                                 <ExamInteractions>
                                                      <QuesNum>       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions/@QuesNum"/></QuesNum>
                                                      <StudentResp>       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions/@StudentResp"/></StudentResp>
                                                      <CorrectResp>       <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions/@CorrectResp"/></CorrectResp>
                                                         <Judged>          <xsl:value-of select="a:GetStudentsExResponse/GetStudentsExResult/Courses/Course/Student/Lesson/ExamInteractions/@Judged"/></Judged>
                                                 </ExamInteractions>
                                            </Lesson>
                                            </xsl:for-each>
                                       </Student>                                   
                                  </xsl:for-each>
                                  </Course>
                                  </xsl:for-each>
                             </Courses>
                        </GetStudentsExResult>
                   </GetStudentsExResponse>                                        
              </a:Course_Response_MT>
         </xsl:template>
    </xsl:stylesheet>     
    However when i execute this mapping in IR, I get empty tags at the target side:
    <?xml version="1.0" encoding="UTF-8"?>
    <a:Course_Response_MT xmlns:a="urn:sce-com:xi:fi:goyala"><GetStudentsExResponse><GetStudentsExResult><Courses/></GetStudentsExResult></GetStudentsExResponse></a:Course_Response_MT>
    Please Advice....
    Regards,
    XIer

  • XSLT Mapping code

    i want to produce correct output, which is mentioned in the the blog /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    i think there was an error in the XSLT coding.
    i modified the code as follows:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:p2="urn://Mapping">
    <xsl:template match="/">
    <p2:MT_STUD>
    <Records>
            <xsl:for-each select="p2:MT_STUD_SORC/Records/Student_ID">                    
                <Student_ID>
                <Name>
                     <xsl:value-of select="concat(concat (p2:MT_STUD_SORC/Records/Student_ID/Fname,' '),p2:MT_STUD_SORC/Records/Student_ID/Lname)"/>
                </Name>
                <Year_Birth>
                    <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,1,4)"/>
                                   </Year_Birth>
                                   <Month_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,5,2)"/>
                                   </Month_Birth>
                                   <Date_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,7,8)"/>
                                   </Date_Birth>
                                   <Marks>
                                          <Science>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Science"/>
                                          </Science>
                                          <Maths>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths"/>
                                          </Maths>
                                          <Language>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Language"/>
                                          </Language>
                                           <Total_Marks>
                                           <xsl:value-of select="sum(p2:MT_STUD_SORC/Records/Student_ID/Marks/Sciense, p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths, p2:MT_STUD_SORC/Records/Student_ID/Marks/Language)"/>
                                           </Total_Marks>
                                 </Marks>
                            </Student_ID>
           </xsl:for-each>
                          <No_Students>
                          <xsl:value-of select="count(p2:MT_STUD_SORC/Records/Student_ID)"/>
                          </No_Students>
            </Records>
           </p2:MT_STUD>
      </xsl:template>
    </xsl:transform>
    here inthis i got two errors, one is SUM function have improper arguments,
    and the second one is, i am unable to produce the multiple students at the receiver side.
    can any body modify and correct this code?
    Thanks ,
    kumar

    hi this is the input file at interface mapping testing:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_STUD_SORC xmlns:ns0="urn://Mapping">
       <Records>
          <Student_ID>
             <Fname>a</Fname>
             <Lname>s</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
          <Student_ID>
             <Fname>we</Fname>
             <Lname>op</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
       </Records>
    </ns0:MT_STUD_SORC>
    but i am not able to see the multiple no of students at out put.
    and it is saying that "sum" function have improper arguments.
    Thanks,
    kumar
    Edited by: kumar kumar on Mar 16, 2009 2:20 PM
    Edited by: kumar kumar on Mar 16, 2009 2:22 PM

  • How to start with XSLT Mapping

    Hi Everyone,
        How to learn XSLT Mapping,Error Analysis,Triggering alerts and Trouble shooting in XI.Plz could anyone help to get through these areas?I'm facing many problems in my inetrviews in the above mentioned areas.I eagerly waiting for the response.
    Regards,
    Swapna..

    Some of the blogs are
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    etc

  • Error using XSLT mapping

    Hi,
    I am using an XSLT mapping during the response processing for a sync interface.
    I have performed the following steps:
    1. Created Translation.xsl and added to a .zip archive
    2. Imported the archive file into the same namespace as the interface mapping
    3. Added the mapping program for type XSL using the imported archive on the response in the interface mapping
    4. Activated everything
    However, when I receive a response, I get the following error:
    Search Translation.xsl (urn:com.xerox.esap.crm.deviceregistration, -1) in swcv f1570070-52e9-11db-c6b4-d3c10ddf0074.</Trace>
      <Trace level="3" type="T">Does not found exact entry. Search in other namspaces.</Trace>
      <Trace level="3" type="T">Search Translation.xsl (-1) in swcv f1570070-52e9-11db-c6b4-d3c10ddf0074 without namespace.</Trace>
      <Trace level="1" type="T">Unable to find resource Translation.xsl (urn:com.xerox.esap.crm.deviceregistration, f1570070-52e9-11db-c6b4-d3c10ddf0074, -1)</Trace>
      <Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.persist.ResourceNotFoundException: Unable to find resource Translation.xsl
    However, I can see the imported archive with my very own eyes so not sure why this error is being thrown.
    Any ideas ?
    Kind regards
    Colin.

    Colin,
    First test your mapping is working fine or not in interfaace mapping. Just referesh your caches as mentioned in this document. This should resolve your issue:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301290
    ---Satish

  • How to do java conjunction with XSLT Mapping...?

    Hi,
    I Got a doubt while doing the XSLT mapping......
    I have created the
    Data Types
    Message Types
    and
    Message Interfaces
    Now my doubt is where i have to write the XSLT and Java code and how to create Message Mapping and Interface Mappings...
    Please help me...
    Best Regards
    Ravi Shankar B

    Hi
    I have created a XSLT mapping with java conjunction... i have created a ZIP file and i have palced java class file, java file and xsl file in that ZIP file... I have imported this archive into imported archives... but when i am testing the application i got the follwoing exceptions
    <b>Details
    com.sap.engine.services.ejb.exceptions.BaseRemoteException:
    Exception in method transform.
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:182)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native
    Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.UnsupportedClassVersionError:
    DATEandTIME/Date_Time (Unsupported major.minor version
    49.0)
         at java.lang.ClassLoader.defineClass0(Native
    Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33)
         at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:69)
         at com.sap.engine.lib.xsl.xpath.functions.XFFunctionAvailable.execute(XFFunctionAvailable.java:24)
         at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:110)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:54)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:41)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:49)
         at com.sap.engine.lib.xsl.xslt.XSLIf.process(XSLIf.java:28)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:457)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:391)
         at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:392)
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:234)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80)
         at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:131)
         ... 10 more
    ; nested exception is:
         java.lang.UnsupportedClassVersionError:
    DATEandTIME/Date_Time (Unsupported major.minor version
    49.0)
    com.sap.engine.services.ejb.exceptions.BaseRemoteException:
    Exception in method transform.
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:182)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native
    Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.UnsupportedClassVersionError:
    DATEandTIME/Date_Time (Unsupported major.minor version
    49.0)
         at java.lang.ClassLoader.defineClass0(Native
    Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33)
         at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:69)
         at com.sap.engine.lib.xsl.xpath.functions.XFFunctionAvailable.execute(XFFunctionAvailable.java:24)
         at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:110)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:54)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:41)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:49)
         at com.sap.engine.lib.xsl.xslt.XSLIf.process(XSLIf.java:28)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:293)
         at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:457)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:391)
         at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:392)
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:234)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80)
         at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:131)
         ... 10 more
    ; nested exception is:
         java.lang.UnsupportedClassVersionError:
    DATEandTIME/Date_Time (Unsupported major.minor version
    49.0)</b>
    Please help me....
    Best Regards
    Ravi Shankar B
    Message was edited by: RaviShankar B

  • Error in XSLT mapping while using string functions

    Hi All,
    While using tokenize() and substring-before() functions in XSLT mapping,we are getting an error.The error message is Unexpected symbol "" So while using string functions in XSLT mapping do we have to use any header functions.
    Please through light on syntax etc.,of string functions in XSLT.
    Thanx in advance,
    Lokesh Dhulipudi
    Edited by: LOKESH DHULIPUDI on Dec 27, 2007 7:32 AM

    Hi,
    Hope you have gone thru this help:
    http://w3schools.com/xsl/default.asp
    Rgds, Moorthy

  • Issue with XSLT Mapping

    Hi Team,
    I have one requirements which I am explaining below:
    Source structure should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Student xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <Data>
          <FName>
          <LName>     
          <Marks>                            Here Data fiels is 0......Unbounded.
                    <Maths>
                    <Science>        
    </ns0:MT_Student>
    and Target structure must be like below:
    <MT_Student_Result>
    <Data>
          <Name>                         Here data field is 0......Unbounded.
          <Marks>
                   <Total_Marks>
    In the target structure Filed "Name" is obtained by concating "FName" and "LName" in the source structure
    and the field "Total_Marks" is the sum of field "Maths" and "Science" in the source structure.
    I have used XSLT mapping to obtain this.I have got the value of the "Name" field in the Target structure as required but I am not getting the value of the field "Total_Marks" in the target structure as required.Every time I am putting any value the result is comming as "NaN" as a value of the field "Total_Marks".Can you explain what is the issue?I am providing the code that I have done
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:fo="urn:bp:xi:hr:edm:test:100" xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    <xsl:template match="/">
    <MT_Student_Result>
    <xsl:for-each select="ns0:MT_Student/Data">
    <xsl:variable name="name" select="FName"/>
    <xsl:variable name="surname" select="LName"/>
    <Data>
    <Name>
    <xsl:value-of select="concat($name,'',$surname)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="maths" select="ns0:MT_Student/Data/Marks/Maths"/>
    <xsl:variable name="science" select="ns0:MT_Student/Data/Marks/Science"/>
    <xsl:value-of select="($maths+$science)" />
    </Total_Marks>
    </Marks>
    </Data>
    </xsl:for-each>
    </MT_Student_Result>
    </xsl:template>
    </xsl:transform>
    Edited by: ATANU1 on Mar 17, 2011 1:40 PM

    Hei,
    you have to add the namespace prefix to each element of the path (and of course: check out if the hierarchy is matching)
    ns0:MT_Student/ns0:Data/ns0:Marks/ns0:Science
    Regards,
    Udo

  • IDOC TO HTML FILE SCENARIO WITH XSLT MAPPING

    Hi ,
                 I am doing idoc to html file using xslt mapping can anyone provide me some help(material or example ) please reply soon.
    Thanks & Regards,
    Vinay Yadav

    Hi ,
    For xslt mapping the place to start is
    http://www.w3schools.com/.
    in help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/2200cb50d345c793336d9a1683163e/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/64b93d0d4e6b3be10000000a114084/frameset.htm
    There are some blogs here which can proove to be good.
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    https://weblogs.sdn.sap.com/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Regards ,
    Deepak
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

  • N97 MINI V12 Backup error with Nokia Maps Beta 3.0...

    After installation nokia maps 3.06 beta on my fresh hardware reset n97 mini v12 is not possible to make backup from mobile to Memory card from File manager. Phone memory on C: is 220 MB.
    With nokia maps 3.04 backup is ok, with 3.06 error: Memory full, operation canceled (kind)
    I think firmware upgrade from v12 to v20 delay, the reason nokia maps 3.06 is not perfectly integred full functionaly in new firmware.

    have the same problem. I think its a bug in SW 12.. , after a hard reset it worked well until I installed some programs (incl. Maps 3.06). Backup only with PC or Ovi Suite able to do.
    Nokia N9 Black

Maybe you are looking for

  • IMac to TV for Final Cut Pro

    I'm a newbie so forgive my ignorance. I have a mid 2010 iMac and I would like to hook it to my HD insignia TV to view playback for Final Cut content. I just need to know which method is the best (VGA, Mini DV, Hdmi, etc) What cords &  adapters do I n

  • Universe Design and QAAWS interface with Xcelsius

    Hello, I need to find out that if I have a universe given to be in a zip file, (assuming that the database is not available with it on the same machine.)  I need to publish the universe on the local serverver. (using file export option) Then I use QA

  • Error message "ISWUIlib.dll missing each time I start Firefox

    This error comes up each time I open Firefox. I go on and Firefox works fine. == This happened == Every time Firefox opened

  • Mail not receiving

    A search on this topic reveals a lot of questions and solutions for this problem. I trashed my MS machines to avoid these kinds of issues! In a nutshell: Mail will not download messages from my POP server. Connection Doctor indicates everything is wo

  • HT5312 Can I have new questions

    I want different security questions to verify my account