Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Help Required on XSLT Mapping

$
0
0

Hi Folks,

    I need some help on XSLT mapping as I am very new to it. I have attached a source and target  file. I need inputs on XSLT mapping in order to achieve the Target message from the Source.

 

Source

 

 

xmlversion="1.0"encoding="UTF-8"?>

ns0:Messagesxmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

  <ns0:Message1>

    <ns1:PayloadDescriptorxmlns:ns1="http://Softel.com/xi/Softel_SC_PLANNING/GPEO/TransactionalData">

      <MessageFormat>owner=&quot;Softel&quot;;version=1.0;date=&quot;October 2013&quot;;</MessageFormat>

      <SenderId>Softel-GPEO</SenderId><RecipientId>SoftelCorp</RecipientId>

      <ControlNumber>0000000001</ControlNumber>

      <MessageId>A123-B123-C123-D123</MessageId>

      <DocumentType>SoftelOrders</DocumentType>

      <DateSentformat="yyMMDDhhmmss"timezone="UTC">20140117000001</DateSent>

      <PayloadType>Text/Plain</PayloadType>

      <Version>1.0</Version>

    </ns1:PayloadDescriptor>

</ns0:Message1>

<ns0:Message2>

    <AttachmentDescriptor>

       <DocumentType>SoftelOrders</DocumentType>

       <Version>1.0</Version>

       <Dateformat="yyMMDDhhmmss"timezone="UTC">20140117000001</Date>

       <Attachmentscount="">

          <Attachment>

            <FileData>

              <Includehref="A123-B123-C123-D123">

              </Include>

            </FileData>

            <FileName>Sample.txt</FileName>

            <FileType>Text</FileType>

            <FileCreateDateformat="yyMMDDhhmmss"timezone="UTC">20140117000001</FileCreateDate>

           <FileSizeuom="byte">100</FileSize></Attachment>

         </Attachments>

      </AttachmentDescriptor>

</ns0:Message2>

</ns0:Messages>

 

Target Message

 

<?xml version="1.0" encoding="UTF-8"?>

<ns0:stylesheet version="1.0" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://Softel.com/xi/Softel_SC_PLANNING/GPEO/TransactionalData">

   <ns0:template match="/">

      <ns1:Envelope xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">

         <ns1:Header>

            <PayloadDescriptor>

               <MessageFormat>&quot;Softel&quot;;version=1.0;date=&quot;October 2013&quot;;</MessageFormat>

               <SenderId>Softel-GPEO</SenderId>

               <RecipientId>SoftelCORP</RecipientId>

               <ControlNumber>0000000001</ControlNumber>

               <MessageId>A123-B123-C123-D123</MessageId>

               <DocumentType>SoftelOrders</DocumentType>

               <DateSent format="yyMMDDhhmmss" timezone="UTC">20140117000001</DateSent>

               <PayloadType>Text</PayloadType>

               <Version>1.0</Version>

            </PayloadDescriptor>

         </ns1:Header>

         <ns1:Body>

            <AttachmentDescriptor>

               <DocumentType desc="" valueDesc="">SoftelOrders</DocumentType>

               <Version desc="" valueDesc="">1.0</Version>

               <Date desc="" valueDesc="" format="" timezone="">20140117000001</Date>

               <Attachments count="1">

                  <Attachment>

                     <FileData>

                        <Include href="A123-B123-C123-D123"/>

                     </FileData>

                     <FileName>Sample.txt</FileName>

                     <FileType desc="" valueDesc="">Text</FileType>

                     <FileCreateDate desc="" valueDesc="" format="" timezone="">20140117000001</FileCreateDate>

                     <FileSize desc="" valueDesc="" uom="byte">100</FileSize>

                  </Attachment>

               </Attachments>

            </AttachmentDescriptor>

         </ns1:Body>

      </ns1:Envelope>

   </ns0:template>

</ns0:stylesheet>


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>