Preserving spaces in XSLT Mapping

Hi ,
    My source structure has a field
<field1>     aaaa1234</field1>
whens this field is transformed by using a XSLT mapping the output is as follows
<field1>aaaa1234</field1>
This output is visible in the interface mapping itself.
The leading spaces are truncated. Can any one suggest me on how to preserve leading spaces during XSLT mapping?
Thanks
VasS

Hi,
Refer this link
http://www.w3.org/TR/xslt20/Overview.html#element-preserve-space
Regards
Suraj

Similar Messages

  • Oracle XSLT Transformation not preserving space in text element

    If we have a BPEL process which is calling a XSLT transformation contains the code similar as below:
    for Populating an element with white space only
    <tns:TargetField>
    <xsl:text disable-output-escaping="yes"> </xsl:text> <!--Note the whitespace , also tried with disable-output-escaping =”no” -->
    </tns: TargetField>
    Our expected result / output would be:
    <tns:TargetField> </tns: TargetField> <!--Note the whitespace -->
    But, we get:
    <tns:TargetField/>
    Oracle XSLT is ignoring the white space even if we try with preserve space in XSD, or in XSLT this is not producing the expected output.
    This looks a BUG with Oracle XSLT Transformation .
    For a workaround solution we can use below XSLT snippet:
    *<tns:TargetField>*
    *<xsl:value-of select="string(' ')"/> <!--Note the whitespace -->*
    *</tns:TargetField>*
    This is returning Output:
    *<tns:TargetField> </tns:TargetField> <!--Note the whitespace -->*
    Any other work around do you find?
    Edited by: panks on Jul 29, 2011 12:37 PM

    The workaround only works with one white space, if one put more white spaces, it do not work.
    <tns:TargetField>
    <xsl:value-of select="string(' ')"/> <!--Note the whitespaces -->
    </tns:TargetField>
    This is returning Output:
    <tns:TargetField> </tns:TargetField> <!--Note the only one whitespace -->
    Edited by: user10697506 on Aug 10, 2011 3:27 PM

  • Help Required for XSLT mapping

    Hi Folks,
    I am working on a scenario, where we had 17 different one to one mapping with same source strcture but different target structures. Source is a Idoc common for everyone.
    Sample Target Structure :
    Message Type(XYZ)
                     RECORDS(0,u)
                                             A(0,1)
                                             B(0,1)
                                             C(0,1)
                                             D(0,1)
    As per our requirement we need the output in which we need to have "GLOBE " at the top and the value of A, B, C and D on single row for each ouurance of RECORD. For 2nd occurance we need to change the line and 2 nd set of ABCD on 2nd row and so on. e.g.
    GLOBE
    0002044452KNA1 0000027079 0001E
    0002044452KNA1 0000027080 0001E
    0002044452KNA1 0000027080 0001E
    To acheive the above output we are using a XSLT map after Message Mapping
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" indent="no" encoding="UTF-8" omit-xml-declaration="yes"/>
    <xsl:preserve-space elements="*"/>
    <xsl:template match="/">GLOBE<xsl:text>&#xD;&#xA;</xsl:text>
    <xsl:for-each select="//RECORDS">
      <xsl:for-each select="*">
         <xsl:value-of select="current()"/>
      </xsl:for-each><xsl:text>&#xD;&#xA;</xsl:text></xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    NOW WE HAVE changed the 17 one to one maps to one multi mapping (1:17) as our source is same.
    Now as the output of this multi mapping is getting into XSL code, it is not able to parse it.
    How can we do the changes in this particular code So that we can Achieve:                     17 different file out of single multi mapping and XSL map like it was comming previously from 17 different maps.
    Thanks
    Pradeep

    Hi Pradeep,
    Depending on how you setup your multi mapping, when you execute you will end up with something like this as the xml output:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
      <ns0:Message1>
        <XYZ></XYZ>
        <XYZ></XYZ>
      </ns0:Message1>
    </ns0:Messages>
    Or this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
      <ns0:Message1>
        <XYZ></XYZ>
      </ns0:Message1>
      <ns0:Message2>
        <XYZ></XYZ>
      </ns0:Message2>
    </ns0:Messages>
    The single xml message with the u201CMessagesu201D wrapper is not split into separate messages until it hits one of the adapters in the adapter engine.  Perhaps you can try to adjust the xslt to expect this as input, but the output would still need to be <ns0:Messages>.  That might be what is causing the failure with your current xslt.  Can the flat file conversion in the file adapter?
    Thanks,
    -Russ

  • 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

  • ERROR WHILE USING XSLT MAPPING IN INTERFACE MAPPING

    Hi,
      We are using an xslt mapping in our scenario but while i load the XSLT mapping in the interface mapping i get a message :
    Transformer configuration exception occurred when loading XSLT
    sorce interface :outbound and asyncronous.
    mapping : XSLT mapping (imported as a zip file)
    target interface: abstract,asyncronous.
    The xslt runs well in standalone and its well formed and there is no name space issue.
    please help if any one has faced such a situation while using XSLT mapping.
    regards,
    Anirban.

    Hi Anirban
    When you say it runs well <i>standalone</i> what exactly do you mean? Which XSLT processor are you using to run it? There are subtle difference between XSTL processors that can sometimes result in incompatibilities. For instance, I have seen XSLTs run correctly in XMLSpy but incorrectly (or at least slightly differently) in XI.
    Regards,
    Thorsten

  • XSLT Mapping : XML to Fixed Length File

    Hi,
    I have to code a XSLT mapping which converts the XML into a Fixed Length File Format. I am getting the output but it has some garbage values (Some extra spaces in front of first record and also extra blank lines before the first record)
    I am pasting my xsl sheet :
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="text" indent="yes" media-type="text/plain"/>
         <xsl:template match="Employees">
              <xsl:for-each select="Employee">
                   <xsl:value-of select="Name"/>
                   <xsl:value-of select="ID"/>
                   <xsl:value-of select="ADD"/>
                   <xsl:text>&#xA;</xsl:text>
              </xsl:for-each>
         </xsl:template>
    My input XML file is as follows:
    <?xml version="1.0"?>
    <p1:Test02 xmlns:p1="http://www.infosys.com/xi/training/hyd/66289">
            <Employees>
              <Employee>
                 <Name>Anurag</Name>
                 <ID>1121</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Divya</Name>
                 <ID>1122</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Rasmi</Name>
                 <ID>1123</ID>
                 <ADD>Bangalore</ADD>
                </Employee>
         </Employees>
    </p1:Test02>
    And the output i am receiving is as follows:
        Anurag1121Hyderabad
    Divya1122Hyderabad
    Rasmi1123Bangalore
    Please do help.....

    hi,
    >>>>
    <xsl:output method="text" indent="yes" media-type="text/plain"/>
    you allow the spaces by using indent="yes"
    try with indent="no"
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Help in XSLT Mapping

    Hi mates,
    I'm trying out the scenario in one of michal's blogs
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    my source message is as follows
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ErrorDetails xmlns:ns0="http://xyz.com/utility/errors/ReportErrors">
       <Object_Error>
          <Client/>
          <Logical_System/>
          <Object_Type/>
          <Object_Key>1234</Object_Key>
          <Error_Message/>
       </Object_Error>
       <Object_Error>
          <Client/>
          <Logical_System/>
          <Object_Type/>
          <Object_Key>1235</Object_Key>
          <Error_Message/>
       </Object_Error>
    </ns0:MT_ErrorDetails></i>
    I'm trying to generate o/p which will have 'Object_key's separated by line break i.e. new line.
    I wrote teh following XSLT code in XSLT_TOOL.
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <html>
    <body>
    </body>
    <p>
    <strong>The following is the list of Material Numbers with errors</strong>
    </p>
    <p>
    <ol>
    <xsl:for-each select="Object_Error">
    <li value="0">
    <xsl:value-of select="Object_Key"/>
    </li>
    </xsl:for-each>
    </ol>
    </p>
    </html>
    </xsl:template>
    </xsl:transform>
    I wrote this based on XSLT mapping given in the blog. But my mapping is not giving me the required result. It gives the following o/p.
    <i><html><body></body><p><strong>The following is the list of Material
    Numbers with errors</strong></p><p><ol></ol></p></html></i>
    It doesnt select the 'Object Key's. What is wrong/missing in the XSLT mapping..XSLT gurus please help out this beginner.
    I highly appreciate your inputs.
    thx in adv
    praveen

    Hi Praveen,
    I think the reference in your loop is not correct.
    Try
    <xsl:for-each select="Object_Error/Object_Key">
    <li value="0">
    <xsl:value-of select="."/>
    </li>
    </xsl:for-each>
    or
    <xsl:for-each select="Object_Error">
    <li value="0">
    <xsl:value-of select="./Object_Key"/>
    </li>
    </xsl:for-each>
    both should work.
    regards
    Dirk

  • XSLT mapping not working b'coz " " & " " replaced with and

    Hello Experts,
      I have a RFC to JMS scenario. One of the parameter of RFC is a string field. This field will contain the XML data in it.
    I need to create a complete XML payload using this data in a string field. For this I am using XSLT map :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
         <xsl:output method="xml" omit-xml-declaration="no"/>
         <xsl:template match="/">
              <xsl:for-each select="//Nem">
                   <xsl:copy-of select="."/>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    This XSLT mapping works fine when tested independently.
    But in actual scenario at runtime the "<" & ">" used to indicate a node are getting replaced with < and >. Then the XSLT mapping fails and produces no output.
    The output of XSL will be passed in to a java mapping which signs the payload digitally.
    What is the issue with these signs? How can I overcome this problem?
    Any inputs will be of great help.
    Kind Regards,
    Abhijeet.
    Edited by: Abhijeet Ambekar on May 4, 2010 2:01 PM

    Hi Stefan,
      Yes - I want to get rid of & # 60. But these (& # 60 and & # 62) are not added by XSLT mapping. Rather they are in the input available to XSLT map.
    In sxmb_moni, i can see the inbound payload correctly :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <rfc:HDK083_REFUS_SENDDOCU xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <P_SIGN_DOCUMENT />
      <P_XML_DOCUMENT><NemRefusionIndberetningSamling><NemRefusionIndberetningStruktur MessageID="1"><HeaderStruktur><SignOffIndikator>true</SignOffIndikator><TransaktionKode>Opret</TransaktionKode><IndberetningstypeKode>Anmeldelse</IndberetningstypeKode><FravaerTypeKode>Sygdom</FravaerTypeKode><FravaerendeStruktur><FravaerendeTypeKode>Loenmodtager</FravaerendeTypeKode><LoenUnderFravaerIndikator>false</LoenUnderFravaerIndikator></FravaerendeStruktur><IndberetningUUIDIdentifikator>bf9cc44e-af15-4e19-8457-5845d75385d2</IndberetningUUIDIdentifikator><ReferenceAttributTekst>ref. Nielsen-1503831372 (23. oktober 2009)</ReferenceAttributTekst>
    but when I try to download the payload or right click on payload to view source I get something like below:
    <?xml version="1.0" encoding="UTF-8"?><rfc:HDK083_REFUS_SENDDOCU xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><P_SIGN_DOCUMENT></P_SIGN_DOCUMENT><P_XML_DOCUMENT>& # 6 0;NemRefusionIndberetningSamling& # 62; & # 60;NemRefusionIndberetningStruktur MessageID="1"& #62;& #60;HeaderStruktur& #62;& #60;SignOffIndikator& #62;true& #60;/SignOffIndikator& #62;& #60;TransaktionKode& #62;Opret& #60;/TransaktionKode& #62;& #60;IndberetningstypeKode& #62;Anmeldelse& #60;/IndberetningstypeKode& #62;& #60;FravaerTypeKode& #62;Sygdom& #60;/FravaerTypeKode& #62;& #60;FravaerendeStruktur& #62;& #60;FravaerendeTypeKode& #62;Loenmodtager</FravaerendeTypeKode><LoenUnderFravaerIndikator& #62;false</LoenUnderFravaerIndikator></FravaerendeStruktur& #62;<IndberetningUUIDIdentifikator& #62;bf9cc44e-af15-4e19-8457-5845d75385d2& #60;/IndberetningUUIDIdentifikator& #62;& #60;ReferenceAttributTekst& #62;ref. Nielsen-1503831372 (23. oktober 2009)& #60;/ReferenceAttributTekst& #62;
    (extra spaces added to "& # 60" as browser was converting it to < ,>)
    If i take the source code for payload and test XSLT mapping, it fails. But if I manually replace all "& # 60" with < and "& # 6 2" with >, then the mapping works fine.
    So I think for XSLT map to work correctly, we need to replace all "& # 60 " . Please suggest.
    Kind Regards,
    Abhijeet.

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • How to write XSLT codeing in file to file using XSLT mapping?

    Hi ,
    Experts,
    I am new to XSLT coding as iam doing File to File XSLT Mapping for i have created IR and ID part and i have wriiten XSLT codeing which is not working.
    source structure:                     Target structure
    Fname                                    Name  = (Fname+Lname)
    Lname
    maths   
    science                                   Total_marks = (mathssciencesocial)
    social   
    <?xml version='1.0' ?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
    <xsl:template match="/">                                               |
    <aash:mt_student_result>                                      this is my Naming Space
    <Data>
    <Name>
    <xsl:value-of select="concat(ns0:mt_student/data/FName,ns0:mt_student/data/LName)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:value-of select="(ns0:mt_student/data/Marks/Maths)(ns0:MT_Student/Data/Marks/Science)(ns0:mt_student/data/Marks/Social)"/>
    </Total_Marks>
    </Marks>
    </Data>
    </aash:mt_student_result>
    </xsl:template>
    </xsl:transform>
    while testing in Interface mapping the values are not comming into result side please verify the code and suggest me the correct one.
    Thanks in advance
    shabeer ahmed.

    Hi Shabeer,
    PFB, the corrected XSL.
    try using it, it would work.
    <?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:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
    <xsl:template match="/"> |
    <aash:mt_student_result> this is my Naming Space
    <Data>
    <Name>
    <xsl:variable name="vFName" select="ns0:mt_student_result/Data/FName"/>
    <xsl:variable name="vLName" select="ns0:mt_student_result/Data/LName"/>
    <xsl:value-of select="concat($vFName,$vLName)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="vMaths" select="ns0:mt_student_result/Data/Marks/Maths"/>
    <xsl:variable name="vScience" select="ns0:mt_student_result/Data/Marks/Science"/>
    <xsl:value-of select="concat($vMaths,$vScience)"/>
    </Total_Marks>
    </Marks>
    </Data>
    </aash:mt_student_result>
    </xsl:template>
    </xsl:transform>
    I have given input as,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_student_result xmlns:ns0="http://xlst.file2file">
              <Data>
                   <FName>FName</FName>
                   <LName>LName</LName>
                   <Marks>
                   <Maths>M</Maths>
                   <Science>S</Science>
                   </Marks>
              </Data>
    </ns0:mt_student_result>
    Output was,
    <?xml version='1.0' ?>
    |
    <aash:mt_student_result xmlns:sap="http://www.sap.com/sapxsl" xmlns:ns0="http://xlst.file2file" xmlns:aash="http://xlst.file2file"> this is my Naming Space
    <Data><Name>FNameLName</Name><Marks><Total_Marks>MS</Total_Marks></Marks></Data></aash:mt_student_result>
    It worked.Try it out.
    Regards,
    Swetha.

  • XSLT mapping: namespace

    Hi,
    I have a problem with my XSLT mapping... My scenario is <b>file to IDoc</b> (Orders05) and I use xsd schemes as external definitions.
    When I test my mapping in the Interface mapping I don't get any values in the target IDoc. I think it's a problem with the namespaces but I'm not sure though...
    Is this the correct way of filling up a field ?
    <DATUM><xsl:value-of select="Document/Order/OrderHeader/Dates/RequestedDeliveryDate"/></DATUM>
    Could anyone give me a <b>simple example</b> of xslt mapping, so I can match with my mapping ?
    Source interface: MI_Orders
    Target interface: ORDERS.ORDERS05
    Source msg: Document
    Target msg: ORDERS.ORDERS05
    XML Document source message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Document xmlns:ns0="http://www.certione.com/RFOrder/Schema">
       <SenderID/>
       <ReceiverID/>
       <DocumentDate/>
       <DocumentNumber/>
       <TestIndicator/>
       <Version/>
       <Order/>
    </ns0:Document>
    Thx in advance!
    Wouter.
    Message was edited by: Wouter Dhaenens

    Hi,
    thx for your answers but I didn't make it to solve my problem yet...
    My external definition generates the source xml input data:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Document xmlns:ns0="http://www.certione.com/RFOrder/Schema">
       <SenderID/>
       <ReceiverID/>
       <DocumentDate/>
       <DocumentNumber/>
       <TestIndicator/>
       <Version/>
       <Order/>
    </ns0:Document>
    I want to generate a ORDERS05 IDoc... is it necessary to map the EDI_DC40 instance with all the fields as described in OSS note 728792 in my XSLT mapping?
    <?xml version="1.0" encoding="UTF-8"?>
    <ORDERS05 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:Documents and SettingsdevadmMy DocumentsAltova ProjectsUntitled1.xsd">
         <IDOC BEGIN="1">
              <EDI_DC40 SEGMENT="1">
    When I try to test I get the error "XML not well formed", the problem is that my example source document has the root node <Document> and the external definition generates a <ns0:Document> as root node...
    Begin of my XSLT mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <!-- <xsl:decimal-format name="point" decimal-separator="."/> -->
         <!-- <xsl:output encoding="ISO-8859-1"/> -->
         <xsl:output encoding="UTF-8"/>
         <xsl:strip-space elements="*"/>
         <!-- Root -->
         <xsl:template match="/"/>
         <!-- <ORDERS05 xmlns:ns="http://certipost.be/xi/XI/Orders"> -->
         <!-- ================================================================= -->
         <!-- Segment Document -->
         <!-- ================================================================= -->
         <xsl:template match="Document">
              <xsl:element name="ORDERS05">
                   <xsl:element name="IDOC">
                        <xsl:apply-templates select="Order"/>
                   </xsl:element>
              </xsl:element>
         </xsl:template>
    Does anybody have a solution for this annoying problem ? :s
    Thx in advance,
    Wouter.

  • Invalid tag generated in result XML file, xslt mapping done using MAPFORCE

    HI
    My requirement is File to File using xslt mapping
    I have done a very simple XSLT mapping, but through MAPFORCE tool
    Here are the steps, I followed:
    1. Supplied source xsd and xml file to MAPFORCE
    2. Supplied target xsd file
    3. mapped it as required
    4. tested by supplying a sample xml file by clicking OUTPUT button, which displays perfect XML structure
    5. Clicked XSLT button and copied and created a new file with extension .xsl file
    6. Zipped the above xsl file
    7. imported into IR imported archives folder
    8. Selected the above xslt mapping in my Interface mapping.
    9. Now tested my Interface Mapping by supplying sample some data for the source structure.
    Now I got the error or warning "XML not well-formed" and got the successfull completion message window for my mapping when I proceed.
    Now when I clicked xml source button for the target structure, It displays the invalid tag and starting with "#default"
    So If I removed this particular tag at the first and last lines, it becomes a valid xml structure and able to see properly in my internet explorer
    Here is the result I am getting:
    <?xml version="1.0" encoding="UTF-8"?>
    <#default:MT_Student_Result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:xsltMappingScenarios C:/DOCUME~1/Satya/Desktop/MT_Student_Result.xsd">
      <Data>
        <Name>Khan Raj</Name>
        <Marks>
          <Total_Marks>166</Total_Marks>
        </Marks>
      </Data>
    </#default:MT_Student_Result>
    When I tested through MAPFORCE it generates absolutely valid XML structure when I clicked OUTPUT button on MAPFORCE, but not when I used the xslt mapping through my interface mapping.
    What is the error I am making or any step missing?
    Please help me!
    Edited by: Shilpa Shetty on Oct 9, 2008 4:17 AM
    Edited by: Shilpa Shetty on Oct 9, 2008 5:58 AM
    Edited by: Chris Rock on Oct 9, 2008 6:06 AM

    For some reason when I use MapForce tool to generate my xslt mapping source, it is generating the following statement in the xsl file.
         <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
    So at the root element of XML file, it is replacing the character n with '#default' for some reason, I don;t know the purpose of this.
    As you suggested, I changed the name space, still I experienced same problem.
    It is now resolved after removing the above xsl statement from the xsl file before creating/uploading the relevant zip file into archives folder.
    It works fine now. Thanks for the clue.

  • Exception while running xslt mapping

    Hi all,
    I am doing an xslt mapping to get an html content . Within xslt mapping code i am using "&nbsp" to add white space . I am using Stylus Studio to run the mapping , when i run it in Stylus , its executing fine.
    But once I import this xslt mapping into XI & run it from Interface mapping , i am getting (The entity "nbsp" was referenced, but not declared.) excpetion.
    I have declared <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>  as well in my mapping ...even then i am getting the error.
    Please provide ur inputs
    Regards
    Vinay P

    Hi Vinay,
    Can you please share the exact line in XSLT?
    If I may suggest, you can use a simple way like <xsl:value-of select="concat('txt1',' ','txt2')"/> or simply <xsl:text>text1 text2<xsl:text>
    If this does not address, please provide more details on the problem statement.
    Thanks and Regards,
    Sarath...

  • XSLT Mapping......xsl-xs difference

    Dear all,
    In one of our scenarios we have used an xsd file where in we used xs instead xs1 and at the begining there was no name space.
    Can you throw more light on the same as I am confused.
    Thanks,
    Srinivasa

    Hi,
    Go through these
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    Some scenarios
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    Regards,
    AKshay Jamgoankar,
    Reward points if find useful.

  • Getting unwanted values between the XML tags in XSLT mapping

    Hi Folks
    I have come across a very strange situation with my xslt mapping.
    I am getting unwated values "11" between xml tags
    as follows
    <Tag>0001</Tag>
    11
    <DataID>3</DataID>
    I am not sure why I am getting these values in between the tags. Any suggestions would be appreciated.

    Hi David,
    Here is the code fragment where these 2 tags are mapped, FYI, the source is an IDOC message. The unwanted "11" is coming After the <Tag></Tag> and <DataID></DataID>. FYI, Fof the element <Tag></Tag> its a default value. But for <DataID> </DataID>  I have the mapping logic.
    <Order>
                <OrderHeader>
                  <Tag>009</Tag>
                  <xsl:for-each select="E1EDKA1">
                    <xsl:choose>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U960'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U300'">
       <DataID>
                        <xsl:value-of select="'3'" />
           </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U930'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U400'">
       <DataID>
                        <xsl:value-of select="'3'" />
       </DataID>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="'1'" />
                      </xsl:otherwise>
                    </xsl:choose>
                   </xsl:for-each>

Maybe you are looking for

  • How can I delete a phone line from my account

    I have two lines that recently passed the 2-year contract date.  I now live overseas and have no use for them, but I can't find a way to delete them online and I can't get any kind of live help via Live Chat or by Calling Verizon via Skype (which is

  • Calling Database Functions

    Hi All, Just wondering whether anyone has experienced problems in calling a database function. We have Forte 3.0.L.2 and Oracle 8.1.7. Here's how the function is being called: l_tdCurrentStatus = (SQL EXECUTE PROCEDURE me_status.get_status(input I_MC

  • How can we ask an order of execution ?

    I want to command un order of execution of two operations in my VI. At the beginning, my program worked well but when I added a for loop, the program doesn't work enought like I want it work... Thanks in advance hasna

  • Import renaming default preference -- does it exist?

    I think the title says it all: auto renaming has now gotten me into trouble a few times.  I would rather forget to rename and have to do so later, rather than forget I did rename, which is when the dupe names start to pile up.  But I don't see a choi

  • Weird env/export problem

    I'm sure I'm doing something wrong, but I can't for the life of me get my changes to env or export to remain persistent through sessions/reboots. I'm trying to battle a few issues at once, the core of which is nano doesn't work correctly from the def