Custom XSLT for Biztalk Maps

Hi,
I have a input xml file and the output xml file. The input message is multi-part message.
I have to create a custom xslt to convert input xml to output xml. The xslt should give an xml output. I have an another xslt to take this output as input and create the output in html form.
Is there any way to convert the existing xslt (which give html output) to the xslt which has to create xml output.
Thanks,
Lakshmi

Hi Lakshmi,
You can the HTML-XSLT (used to output HTML ) as reference for outputting XML in BizTalk but there is no easy way to achieve it with help of any tool. Especially around the XPaths which can going to be similar.
For instance, following an XSLT for outputting HTML
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://biztalk.orderapp.schemas.OrderResponse">
<xsl:template match="/">
<html>
<body>
<TABLE BORDER="0" cellspacing="2" cellpadding="2" width="90%">
<TR>
<TD colspan="8" align="center">
<H1>Order Confirmation</H1>
</TD>
</TR>
<TR>
<TD colspan="2">
<B>Order no : </B>
</TD>
<TD colspan="6" align="left">
<xsl:value-of select="ns0:OrderHeader/ns0:OrderNumber/text()"/>
</TD>
</TR>
</TABLE>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And following an XSLT for outputting XML in BizTalk. You can see the similarities in XPATH and difference around the places they have been used to output HTML and XML.
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ns0="http://biztalk.orderapp.schemas.OrderResponse" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/s3:Registration" />
</xsl:template>
<xsl:template match="/ns0:OrderConfirmation">
<ns0:OrderConfirmation>
<OrderNoo>
<xsl:value-of select="ns0:OrderHeader/ns0:OrderNumber/text()" />
</OrderNo>
</ns0:Output>
</xsl:template>
</xsl:stylesheet>
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Orchestration Variable in Custom XSLT in Biztalk Map

    Hi,
    I have a custom xslt for mapping HL7 messages to CRM fields.
    For one field, I 'll get the data from DB so it is stored in my orchestration variable. How can I use that variable in my custom xslt file? Thanks.
    Regards,
    Lakshmi

    Hi Laxme,
    As far I know, there is no way you can access Orchestration variable in custom XSLT.
    Workaround : you can create a intermediate message with a field and assign the variable value (the data from DB) to it and later use message assignment to assign this value to the field which you want to the mesage which you created using custom
    xslt.
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • How can I write unit tests for BizTalk Maps with multipe inputs?

    I want to bring all my maps under unit test coverage, but can't seem to find a way to test maps with multiple inputs. Maps with multiple inputs are first merged into a single schema by biztalk and then the map actually uses that inline schema as source.
    What I tried is- produced a generated instance of source schema by clicking "Test Map", and then modified the skeletal instance by stitching together the multiple input files into it. There are two problems I am facing going forward that way- 1#
    It takes a lot of time to craft a mock input of inline schema and 2# the mock input fails input validation although the input works just fine in the orchestration.
    So is there a better or standard way to test such Maps?

    For testing maps with multiple inputs, follow the below steps-
    Lets assume you have a map with two input schemas A and B and output as C.
    1) To create the required schema just reverse the inputs i.e. make a map with C as input and A & B as output. Later do a test map. This will generate an XML File with schemas A & B. 
    2) Now you just to need to replace OutputMessagePart_0 to InputMessagePart_0
    and OutputMessagePart_1 to InputMessagePart_1
    Later you can use this xml for testing your original map.
    Refer the below article
    Developing and Testing Maps which have Multiple Source and Destination Schemas
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Custom Pipeline for Biztalk Swift accelator

    Hi Everyone,
    am using BizTalk 2013R2, can any reply how to write custom pipeline for disassembler stage for swift accelater.
    Thanks & Regards
    Rajiv

    Hi Rajiv,
    I think we has already discussed your issue in previous post
    https://social.msdn.microsoft.com/Forums/en-US/2df11643-51b8-4d58-9e83-5abcac590b22/custom-pipeline-code-for-swift-disassembler?forum=biztalkgeneral#2df11643-51b8-4d58-9e83-5abcac590b22
    thanks
    Abhishek

  • BizTalk Map: Grouping CRM Response XML based on the ID field in Custom XSLT

    Hi,
    I will receive a CRM response as below. 
    <ns0:RetrieveMultipleResponse xmlns:ns0="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns3="http://schemas.microsoft.com/xrm/2011/Metadata" xmlns:ns5="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:ns1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:ns4="http://schemas.microsoft.com/xrm/2011/Contracts"><ns0:RetrieveMultipleResult>    <ns4:Entities>      <ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.75000000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">826c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity>   <ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.25000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">766c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity><ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.7500000000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">826c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity></Entities></ns0:RetrieveMultipleResult></ns0:RetrieveMultipleResponse>
    I have  to count the distinct Entities based on ccx_immunizationid value & also I have to group the fields if both entity has same immunization ID. If the xml file (without namespace) and the field is <ccx_immunizationid>2323</ccx_imunizationid>,
    I can use something like below,
    <xsl:template match="//Entity/Attributes[not(./ccx_immunizationid= preceding::ccx_immunizationid)]">
    but here, I have to look for the key 'ccx_immunizationid' and its value. 
    I am using custom xslt in BizTalk map. Please help. Thanks.
    Regards,
    Lakshmi

    You need to get the distinct record filtered by "value" field whose "key" is "ccx_immunizationid" i.e <c:key>ccx_immunizationid</c:key>".
    So you need to use the XPath with syntax: 
    /*[not(@name = preceding::*/@name)]
    So in your case, the XPath value will be like the following:
    /*[local-name()='RetrieveMultipleResponse' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts/Services']/*[local-name()='RetrieveMultipleResult' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts/Services']/*[local-name()='Entities' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='Entity' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='Attributes' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='KeyValuePairOfstringanyType' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts'][*[local-name()='key' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic']/text() ='ccx_immunizationid'][not(*[local-name()='value' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic'] = preceding::*[local-name()='value' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic'])]
    You may need to change the namespaces according to yours. This XPath would give you an idea of how to use the distinct XPath (1.0) snystax as shown above in your XML.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Custom xslt

    The following is the custom xslt for a mapping.
    <xsl:template match="/s0:Job">
        <xsl:element name="job" namespace="http://schemas/outbound/1">
            <xsl:attribute name="contract">
            <xsl:value-of select="ContractNumber/text()" />
          </xsl:attribute>
     <xsl:element name="job_lines">
            <xsl:for-each select="ABCs">
              <xsl:for-each select="ABC">
                   <xsl:variable name="var:v12" select="string(DescriptionLine1/text())" />
                <xsl:variable name="var:v13" select="string(DescriptionLine2/text())" />
                <xsl:variable name="var:v14" select="userCSharp:StringConcat($var:v12 , &quot; &quot; , $var:v13)" />
                          <xsl:element name="job_line">
                             <xsl:attribute name="code">
                    <xsl:value-of select="Code/text()" />
                  </xsl:attribute>
                  <xsl:attribute name="description">
                    <xsl:value-of select="$var:v14" />
                  </xsl:attribute>
                </xsl:element>
                </xsl:for-each>
            </xsl:for-each>
          </xsl:element>
         <xsl:element name="job_notes">
            <xsl:for-each select="Notes/Note">
              <xsl:variable name="var:v16" select="position()" />
              <xsl:variable name="var:v17" select="userCSharp:StringConcat(string(Type/text()) , &quot; | &quot; , string(LineNo/text()) , &quot; | &quot; , string(Text/text()))"
    />
              <xsl:element name="job_note">
                <xsl:attribute name="id">
                  <xsl:value-of select="$var:v16" />
                </xsl:attribute>
                <xsl:attribute name="note">
                  <xsl:value-of select="$var:v17" />
                </xsl:attribute>
              </xsl:element>
              </xsl:for-each>
          </xsl:element>
    </xsl:element>
      </xsl:template>
    Currently, the attribute value for description($var:v14) is the concatenation of $var:v12 and $var:v13
     <xsl:attribute name="description">
                    <xsl:value-of select="$var:v14" />
                  </xsl:attribute>
    Could it be possible to also add $var:v16 and $var:v17 to the description? that is , can $var:v14 be the concatenation of $var:v12, $var:v13, $var:v16 and $var:v17?
    Or can the existing description be overwritten with description+notes?
    The current ouput is
    <job contract="1107">
    <job_lines>
    <job_line description="Repair Smoke Detector - Emergency ">
    </job_line>
    </job_lines>
    <job_notes>
    <job_note note=" | | Please be patient as elderly tenant. Please try''and arrive before dark as she does not like''answering the door''''''''''''''" id="1">
    </job_note>
    </job_notes>
    </job>
    Required output is
    <job contract="1107">
    <job_lines>
    <job_line description="Repair Smoke Detector - Emergency 1 | | Please be patient as elderly tenant. Please try''and arrive before dark as she does not like''answering the door'''''''''''''' ">
    </job_line>
    </job_lines>
    <job_notes>
    <job_note note=" | | Please be patient as elderly tenant. Please try''and arrive before dark as she does not like''answering the door''''''''''''''" id="1">
    </job_note>
    </job_notes>
    </job>

    Code similar to the following shall work for you:
    <xsl:variable name="var:v14" select="userCSharp:StringConcatAndReplace(string(DescriptionLine1/text()), &quot; &quot; ,string(DescriptionLine2/text()))" />
    <xsl:variable name="VarConcat">
    <xsl:for-each select="../../Notes/Note">
    <xsl:value-of select="userCSharp:StringConcat(string(Type/text()) , &quot; | &quot; , string(LineNo/text()) , &quot; | &quot; , string(Text/text()))"/>
    </xsl:for-each>
    </xsl:variable>
    <xsl:variable name="var:v110" select="userCSharp:StringConcat(string($var:v14) , &quot;| &quot; , string($VarConcat) )" />
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Error while using custom xslt: Cannot find the script or external object that implements prefix 'ScriptNS0'.

    Hi,
    We had a complex map. Because of some requirement, we used custom xslt on this map. Somehow at runtime that custom xslt is giving below error:
    Cannot find the script or external object that implements prefix 'ScriptNS0'.
    I checked below links, it seems this is a bug in Biztalk 2010/Visual stuio 2010.
    http://sandroaspbiztalkblog.wordpress.com/2012/07/29/biztalk-mapper-patterns-calling-an-external-assembly-from-custom-xslt-in-biztalk-server-2010/
    The above link suggest to add a xml element in the .btm file. I tried that as well but no luck. Can anyone suggest me reason and solution for this?
    Thanks, Girish R. Patil.

    When using the Custom XSLT option, you have to maintain the Extension Xml yourself, just as you would for inline custom Xslt that calls external Assemblies.
    Docs:
    http://msdn.microsoft.com/en-us/library/aa547368.aspx
    Sample:
    http://blog.vertica.dk/2013/03/20/using-custom-xslt-in-biztalk/

  • Using custom xslt file for mapping

    I have a map using custom xsl. I deployed it to different enviroment. When my BTS application ran, it complained
    There was a failure executing the receive pipeline: "WS.Pipeline.MsgTransformDebatchPipeline, WS.Pipeline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c7f3bdebaae529db" Source: "MsgTransformDecoder" Receive Port: "WS_Debatch"
    URI: "C:\TestData\WS\InternalInput\*_batch.xml" Reason: Could not find file 'C:\WS\BTS\WS.Map\BatchOrder_to_CanonicalBatchOrder.xsl'.
    I have to create corresponding path and copy my xsl file there to make it work. Why?
    I tried Microsoft.Samples.BizTalk.ExtendingMapper.OverridingMapXslt sample. I compiled and deployed it, then I modified OverridingMapXslt.xslt to OverridingMapXslt2.xslt. I dropped input file and there was no complaint about missing OverridingMapXslt.xslt.
    I thought .xsl is treated like any other source code file and is compiled into the assembly at build time. Why I got this error?
    Thanks in advance!!!

    Unless you've compiled the .xsl into your custom component as a Resource, then yes, that exact path has to exist anywhere it will run.
    However, as la Cour points out, a BizTalk Map has a Custom XSLT Path property that will take care of that for you.

  • BizTalk mapping for repeating Nodes using XSLT

    Hi,
    I am mapping the source schema to destination schema using Custom XSLT file. I have a repeating node in the Sources schema:
    Period node can repeat any number of times. I am using the XPath in XSLT to map the nodes from source to destination and using the "for-each" loop.
    Destination Schema:
    I want to map "PeriodID" and "Volume" both to the destination node "html:TD". I am using the following XSLT code:
    <xsl:for-each select="/*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']">
    <html:TR class="data0" level="0">
    <html:TD class="data-int" datatype="int">
    <xsl:value-of select="./*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']/*[local-name()='PeriodID' and namespace-uri()='Namespace']"/>
    </html:TD>
    <html:TD class="data-dbl" datatype="dbl">
    <xsl:value-of select="./*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']/*[local-name()='Volume' and namespace-uri()='Namespace']"/>
    </html:TD>
    </html:TR>
    </xsl:for-each>
    I am only getting the first value of both the nodes in every loop.
    I know that we can use the XPath of the actual Node(PeriodID) in "for-each" loop and use value-of="." to get the current values of the node.
    But the problem is I want both the values "PeriodID" and "Volume" repeating in the destination.

    if you use xpath like you did ( imean without index), you will only get 1 record elements each time.
    Either you have to use code like i did, or use index based xpath.
    The code i gave you should work, just try to debug it from visual studio. Because xslt is a case sensitive, check if the code i gave you matches the elements in case sensitive. may be you have to use prefixes like s1, s2 etc as per you xsl file declaration.
    Check you xsl file for prefix declarations.
    you can also try below code, it uses postion() method to get the current for loop index.
    <xsl:for-each select="/*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']">
    <html:TR class="data0" level="0">
    <html:TD class="data-int" datatype="int">
    <xsl:value-of select="(./*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']/*[local-name()='PeriodID' and namespace-uri()='Namespace'])[position()]"/>
    </html:TD>
    <html:TD class="data-dbl" datatype="dbl">
    <xsl:value-of select="(./*[local-name()='RootNode' and namespace-uri()='Namespace']/*[local-name()='Periods' and namespace-uri()='Namespace']/*[local-name()='Period' and namespace-uri()='Namespace']/*[local-name()='Volume' and namespace-uri()='Namespace'])[position()]"/>
    </html:TD>
    </html:TR>
    </xsl:for-each>
    but i insist you to verify for any prefix declarations in you xsl file
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Using XSLT for Mapping no XSLT intellisense

    I'm using XSD files created with HL7 Accelerator. These schema's use some imports to external librarys. So if I open these XSD files with the xml-editor in Visual Studio I allways see an error on the import "could not find file" because the
    schemalocation is not an file-location it is a reference. I understand that this the way it is used for BizTalk I know this will be resolved.
    But because of that the XSLT intellisense does not work if I use one of these schema's. Is there a way around this?
    (And Yes I've set the key in the register to True, I've tested in another XSLT and there it works).
    Kind Regards
    benny verhamme signed

    Have you considered using stylus studio. You can generate the xml  instance of your schemas and use it , it gives you intellisense also you don't need to execute your map to test that. In case you have this software consider the following points.
    <!--While testing the scripting functoid xslt, after you place the body of your template this is the code you need to include in order to see a xml output or else you will see some values with spaces.-->
    <xsl:template match=”/”>
    <xsl:call-template name=”YOURTEMPLATENAME”/>
    < /xsl:template>
    <!--While tsting the Custom XSL path this is what you need to use:-->
    <xsl:template match=”/”>
    <xsl:apply-templates select=”YOURTEMPLATENAME”/>
    < /xsl:template>

  • Using Custom XSLT File for html output file

    Hi all
    I have probably rather a silly question but I have not found a solution yet.
    I would like to use a custom XSLT file, which I already have and is working, within a Biztalk Map. The custom XSLT is generating a html file out of an xml file. However I'm not able to succeed so far because I have probably some issues in defining the correct
    target schema. 
    The output that I get at the moment is just a duplicate of the input, probably because I have used the schema for source and target.
    So my question is, how do I create a html file out of an xml with a custom XSLT file?
    Sorry if this is a nooby question but I couldn't find an answer.

    Hi Jerome,
    Sorry, your question is not very clear. "I would like to use a custom XSLT file, which I already have and is working, within a BizTalk Map. The custom XSLT is generating a html file out of an xml file" -  You have an XSLT which you use for map and how
    its generating a HTML file? Are you using something like this?
    Changing an XML Response to an HTML output using a Map
    If your requirement is to output the html file from the received XML file using XSLT, then use a custom pipeline at send port like XSLT Transform Component and provide the XST which would change the XML to HTML. Here is an example of an XST which I have
    used in the past, which converts the received OrderResponse XML to nicely formatted HTML.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://biztalk.orderapp.schemas.OrderResponse">
    <xsl:template match="/">
    <html>
    <body>
    <TABLE BORDER="0" cellspacing="2" cellpadding="2" width="90%">
    <xsl:apply-templates select="/ns0:OrderResponse"/>
    </TABLE>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="/ns0:OrderResponse">
    <TR>
    <TD colspan="8" align="center">
    <H1>Order Confirmation</H1>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Order no : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:OrderHeader/ns0:OrderNumber/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Supplier : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:SupplierDetails/ns0:SupplierName/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Supplier Order no : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:SupplierDetails/ns0:SupplierOrderNumber/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Account no : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:OrderHeader/ns0:CustomerAccountNumber/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Order date : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:OrderHeader/ns0:OriginalOrderCreationDate/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Delivery date : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:OrderHeader/ns0:DeliveryDate/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <B>Order Status : </B>
    </TD>
    <TD colspan="6" align="left">
    <xsl:value-of select="ns0:OrderHeader/ns0:OrderStatus/text()"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="8">
    <BR></BR>
    </TD>
    </TR>
    <TR>
    <TD valign="top">
    <B>Line</B>
    </TD>
    <TD valign="top">
    <B>Code</B>
    </TD>
    <TD valign="top">
    <B>UOM</B>
    </TD>
    <TD valign="top">
    <B>
    Avail<BR></BR>Qty
    </B>
    </TD>
    <TD valign="top">
    <B>
    Line<BR></BR>Price
    </B>
    </TD>
    <TD valign="top">
    <B>
    Line<BR></BR>Status
    </B>
    </TD>
    </TR>
    <xsl:for-each select="ns0:LineItems">
    <xsl:for-each select="ns0:LineItem">
    <TR>
    <TD valign="top">
    <xsl:value-of select="ns0:LineNumber/text()"/>
    </TD>
    <TD valign="top">
    <xsl:value-of select="ns0:ProductCode/text()"/>
    </TD>
    <TD valign="top">
    <xsl:value-of select="ns0:UnitOfMeasure/text()"/>
    </TD>
    <TD valign="top">
    <xsl:value-of select="ns0:Quantity/text()"/>
    </TD>
    <TD valign="top">
    <xsl:value-of select="ns0:UnitPrice/text()" />
    </TD>
    <TD valign="top">
    <xsl:value-of select="ns0:LineStatus/text()" />
    </TD>
    </TR>
    </xsl:for-each>
    </xsl:for-each>
    <TR>
    <TD colspan="8">
    <BR></BR>
    </TD>
    </TR>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Give me description for ABAP and XSLT and JAVA Mapping

    i want detailed description for XSLT AND ABAP,JAVA Mapping and where they require coding and some examples for this items and differences for these mappings and message mapping and some examples which shows difference between these items

    Hi,
    Java mapping:
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    ABAP Mapping:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    XSLT mapping
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    ABAP XSLT mapping
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    Regards
    Vijaya

  • Any website for XSLT AND ABAP mapping

    Hi XI experts,
    I am looking for any good website/Material for XSLT and ABAP Mapping with examples.
    So experts if you any one of you have any clue , i would appreciate it , if you post the info here .
    Regds,
    Ram.

    Hi,
    For XSLT mapping, please try to create msg types for sender and recv, import these two into XML Mapforces (This is a software which enables us to do mapping this you can download from altova mapforce site) , do mapping in that mapforce , late click on XSLT icon , one XSLT file will be c reated that file , prepare zip and late come to xi , import under imported archieves,do Interface mapping by selecting the XSLT mapping option, select imported archieve..
    See below examples..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    http://www.troobloo.com/tech/xslt.toc.shtml
    http://www.w3schools.com/xsl/
    http://www.w3.org/TR/xslt
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic%20xslt%20mapping%20in%20sap%20xi%2c%20part%20i.pdf
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    Required XSLT Mapping tips!
    Regards
    Chilla..

  • Issue with XSLT For each loop in B2B Mapping

    Hi All,
    I am trying to map the inbound 997 Payload into Headers and Lines Table. I am using the For Each XSLT Construct to map the Loop AK2 of 997 into the 997 Lines Collection.
    Issue I am facing is that if the Loop AK2 is repeated for 33 times then for all the 33 times only its first element's value is getting passed into the target of mapping file.
    in coming payload
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0001</Element-329>
    </Segment-AK2>
    <Segment-AK5>
    <Element-717>A</Element-717>
    </Segment-AK5>
    </Loop-AK2>
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0002</Element-329>
    </Segment-AK2>
    <Segment-AK5>
    <Element-717>A</Element-717>
    </Segment-AK5>
    </Loop-AK2>
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0003</Element-329>
    </Segment-AK2>
    <Segment-AK5>After transformation using XSLT file the payload looks like as follows
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>33</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>34</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>35</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>36</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>37</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>the Element-329 of incoming source payload is mapped to trxSetControlNumber of target payload, the issue is obvious from the above XML data that trxSetControlNumber is always having the value 0001 for every occurence where as its expected to fetch the value of the element of its corresponding occurence not the first elements value.
    Please find below the xslt file code i used for mapping
    <ns0:XxmfiEdi997_AckHeadersCollection>
          <ns0:XxmfiEdi997_AckHeaders>
            <ns0:headerId>
              <xsl:value-of select='oraext:sequence-next-val("XXMFI_EDI_997_ACK_HEADERS_S","jdbc/MTSI-apps")'/>
            </ns0:headerId>
            <ns0:processFlag>
              <xsl:text disable-output-escaping="no">I</xsl:text>
            </ns0:processFlag>
             <ns0:xxmfiEdi997_AckLinesCollection>
              <xsl:for-each select="/ns1:Transaction-997/ns1:Loop-AK2">
                <ns0:XxmfiEdi997_AckLines>
                  <ns0:lineId>
                    <xsl:value-of select='oraext:sequence-next-val("XXMFI_EDI_997_ACK_LINES_S","jdbc/MTSI-apps")'/>
                  </ns0:lineId>
                  <ns0:trxSetIdentCode>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK2/ns1:Element-143"/>
                  </ns0:trxSetIdentCode>
                  <ns0:trxSetControlNumber>
                    <xsl:value-of select="ns1:Segment-AK2/ns1:Element-329"/>
                  </ns0:trxSetControlNumber>
                  <ns0:segmentError>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Loop-AK3/ns1:Segment-AK3/ns1:Element-720"/>
                  </ns0:segmentError>
                  <ns0:trxSetAckCode>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK5/ns1:Element-717"/>
                  </ns0:trxSetAckCode>
                </ns0:XxmfiEdi997_AckLines>
              </xsl:for-each>
            </ns0:xxmfiEdi997_AckLinesCollection>
          </ns0:XxmfiEdi997_AckHeaders>Is there something I am doing wrong in mapping or am I missing something here. Please suggest .
    Thanks in advance
    ~TK.

    Hi,
    In your xslt code within the for loop, for the trxSetIdentCode why are you using the xpath "/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK2/ns1:Element-143"? It should be just "ns1:Segment-AK2/ns1:Element-143". Similar changes for segmentError and trxSetAckCode also should be done. Remove the '/ns1:Transaction-997/ns1:Loop-AK2/' part from your xpath expressions inside the for loop and try it.
    Sahay

  • Mapping and querying Custom Objects for a Contact with REST Api

    Hello All,
    We are hoping to get some details on managing DataCard set through REST APIs. Our implementation goal is to create Contacts and add Custom object for each Contact, or to be precise, add a DataCard Set for each Contact.
    At the moment, to associate a DataCard Set (or Custom Object) to an existing contact, we are supplying following custom object fields during creation of Custom Object:
    new CustomObjectField 
                                                                    name = "MappedEntityType",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "0"
                                                             new CustomObjectField
                                                                    name = "MappedEntityID",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "<ContactId>"
    Is this the correct approach? This is Based on the information provided here: http://topliners.eloqua.com/community/code_it/blog/2012/05/31/eloqua-api-how-to-mapping-a-data-card-to-an-entity.
    Would the REST API allow us to query the CustomObjects using the MappedEntityId value for later updates? If so, any pointers on how we approach that?
    Thanks in ad.

    Either the MappedEntityID field is not available or I do it wrong, Eloqua is ignoring the field and does not map the custom record with the unique Contact ID
    {"type":"CustomObjectData","ContactID":"8829509","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]},"MappedEntityID":"003J00000145lkBIAQ"}
    Response
    DEBUG|Response------{"type":"CustomObjectData","id":"81720","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]}
    Eloqua:
    Name: PPV-0878545
    Unique Code: a0KJ000000387QvMAI
    Status Registered
    Created Date 12/22/2014 12:44:49 PM
    Mapped NO
    Any Idea how to map this to a contact
    Entity Type is Contacts
    Entity Field is SFDC Contact ID

Maybe you are looking for

  • Agent Desktop can not be logging

    I have this problem: After placing the credentials of the agent and passes connecting to the Cisco UCCX, get the error message: There has timed out the request for connection to Cisco UCCX application server, verify that the system is online and try

  • Modify IR based on my query/search

    Apex 4.x I am able to search for BLOB content using the pl/sql : declare v_name varchar2(100); v_doc blob ; begin select name, doc into v_name,v_doc from BLOB_TABLE where CONTAINS(doc,':P2_GO')>0; end; I am default displaying all the docs in IR with

  • Can one save Puppet Warp settings as a preset?? in Photoshop CC 2014

    Can one save Puppet Warp settings as a preset?? in Photoshop CC 2014

  • Macbook pro charger blinking orange

    My 2011 Macbook pro was dead when I got home from work yesterday and when I plugged in the charger, the charger was blinking a soft orange color. I have never had this happen before and it was working perfectly fine before I left for work

  • Having problems opening an SSIS solution file

    I have to make some changes to an SSIS package that was last modified in 2009 by a person who has left the company. I am having problems finding a version of Visual Studio that will open the SLN file. I do not know how the package was originally main