Biztalk XSLT

I am new to use XSLT. i have a requirement where i have to create a node in output schema.
my input schema is as below
  <?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://XSLTt.Schema1" targetNamespace="http://XSLTt.Schema1"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="Root">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="ID" type="xs:string" />
- <xs:element name="Payload">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SpecificConcession">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Name" type="xs:string" />
  <xs:element name="Address" type="xs:string" />
  <xs:element name="Company" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
Inside the map i have used the scripting functoid and used the inline XSLT by using the below code
<xsl:if test=”//*[local-name()=’SampleConcession’])/*[local-name()=’Name’]”>
<xsl:element name=”Name”>
<xsl:value-of select=”//*[local-name()=’SampleConcession’]/*[local-name()=’Name’]”/>
</xsl:element>
</xsl:if>
when i test the map i am getting the fallowing error
XSl Transform Error:unable to write output instance to the fallowing<> XSlT Compile Error at (8,13) see inner exceptipn for details *[local-name()=’SampleConcession’])/*[local-name()=’Name’ is an invalid xpath expression.*[local-name()=’SampleConcession’])/*[local-name()=’Name’]
has an invlaid token
i am not able to find the cause of this error.
can anyone help me on this?

Actually it should work, try this
Replace the following 
<xsl:element name="Name">  </xsl:element>
with tag <Name>  </Name>
if possible also post a screen shot of your map.
also i see that name_0 is coming as output, That kind of output elements come when map passes auto
generated instance of the input schema as input to map. So it implies that actually the xpath you set is working correctly. Just tweak the output format you need. Also make sure you set your input instance path for you map.
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.

Similar Messages

  • BizTalk XSLT - Item # repeat only once for every 'n' SubItemPart

    Hi - In my current XSLT for repetitive part number, in the output it PartNumber should be once and SubPart # should be repeating under the same part number, but iam not getting
    that.
    Please see below Input, my XSLT and Output
    INPUT :
    <ns0:DetailLoop
    xmlns:ns0="http://P1.DetailLoop">
      <LineItem>
        <PartNumber>ABX-9302</PartNumber>
        <SubPartNumber>aaaa</SubPartNumber>
      </LineItem>
       <LineItem>
        <PartNumber>ABA-1307</PartNumber>
        <SubPartNumber>1307-1981</SubPartNumber>
      </LineItem>
      <LineItem>
        <PartNumber>ABA-1307</PartNumber>
        <SubPartNumber>1307-1982</SubPartNumber>
      </LineItem>
      <LineItem>
        <PartNumber>ABA-1307</PartNumber>
        <SubPartNumber>1307-1983</SubPartNumber>
      </LineItem>
    </ns0:DetailLoop>
    Output :
    <ns0:TargetData
    xmlns:ns0="http://P1.Schema2">
      <ItemInfo>
        <ItemNumber>ABX-9302</ItemNumber>
        <SubItemInfo>
          <SubItemPart>aaaa</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
      <ItemInfo>
        <ItemNumber>ABA-1307</ItemNumber>
        <SubItemInfo>
          <SubItemPart>1307-1981</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1982</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1983</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
      <ItemInfo>
        <ItemNumber>ABA-1307</ItemNumber>
        <SubItemInfo>
          <SubItemPart>1307-1981</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1982</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1983</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
      <ItemInfo>
        <ItemNumber>ABA-1307</ItemNumber>
        <SubItemInfo>
          <SubItemPart>1307-1981</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1982</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1983</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
    </ns0:TargetData>
    XSLT
    <xsl:for-each select="//s0:DetailLoop/LineItem">
           <xsl:variable name = "CurrentPartID">
                   <xsl:value-of select="PartNumber/text()"/>
           </xsl:variable>
            <xsl:if test="//s0:DetailLoop/LineItem[PartNumber!=$CurrentPartID]">
            <!-- Write out an ItemInfo Loop node and an ItemNumber node -->
            <xsl:element name = "ItemInfo">
                                    <xsl:element name = "ItemNumber">
                                       <xsl:value-of select="$CurrentPartID"/>
                                    </xsl:element>
                                    <!-- For the current ParentPartID, select Item nodes where the PartNumber
    is equal to the current part, and the SubPartNumber is not empty -->
                                    <xsl:for-each select = "//s0:DetailLoop/LineItem[PartNumber=$CurrentPartID]">    
                                          <xsl:variable name="ChildPart">
    <xsl:value-of select="SubPartNumber/text()"/>
                                          </xsl:variable>
                                          <!--Write out a SubItemInfo loop
    and a SubItemPart for the current ChildPart  -->  
                                          <xsl:element name = "SubItemInfo">
    <xsl:element name = "SubItemPart">
       <xsl:value-of select="$ChildPart"/>
    </xsl:element>
                                         </xsl:element>
                                    </xsl:for-each>
           </xsl:element>
           </xsl:if>
     </xsl:for-each>
    MBH

    I should be getting output just like below : the rest of it should not be repeating.
    What am I doing wrong that , ItemInfo node(in output) is repeating ?How can I correct it ?
    <ns0:TargetData
    xmlns:ns0="http://P1.Schema2">
      <ItemInfo>
        <ItemNumber>ABX-9302</ItemNumber>
        <SubItemInfo>
          <SubItemPart>aaaa</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
      <ItemInfo>
        <ItemNumber>ABA-1307</ItemNumber>
        <SubItemInfo>
          <SubItemPart>1307-1981</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1982</SubItemPart>
        </SubItemInfo>
        <SubItemInfo>
          <SubItemPart>1307-1983</SubItemPart>
        </SubItemInfo>
      </ItemInfo>
    MBH

  • BizTalk mapper is horrible

    Hello. I want to know if MS plans any improvements in BizTalk mapping? Changes they made in 2010 are laughable.
    My experience with BizTalk mapping starts with 2004 version. But nothing really has changed since that time. And working with maps in BizTalk drives me crazy.
    The problems are:
    1. No reuse at all.
    I don't need to say it's boring to copy paste something from one map into another. But it's more than a boredom - it's against any coding rules. And what if I have 20 maps with copy-pasted block and need to change it?
    Wanna sample? Let's take new CRM (2011). The task is to sync 30 custom dictionaries with other systems. All you can use is late binding (thx MS ;(). Simple drag and drop doesn't work cos u need to map xsi:type attributes on xs:Any elements. The only choice
    is to duplicate xslt scripting functoids over 30 maps..
    2. Bad xslt support.
    Xslt editor in scripting functoid is joke. Every time I want to edit a script I do it in another window of VS..
    3. Custom functoids..
    Why would you create such thing and sandbox it at the same time making it impossible to write anything useful? BaseFunctoid is completely sandboxed. Even with reflection you can't do nothing -it has no references to outworld. If only MS passed there compile-time
    information such as node links and etc, you could do some cool things, but no they didn't.
    And that's only mapping.. Does MS care of BizTalk?

    Thanks for answers. But I can't agree fully agree with your points.
    Although XSLT is great by itself, biztalk puts its own restrictions. xls:import and xls:include don't work in biztalk xslt maps thus leaving you with still no reuse. Using xslt in code with custom resolver gives other challenges like storing and
    resolving xslt in resources, scaleability and other issues.
    I wouldn't be so optimistic about 99% transformations fitting awsome in mapper capabilities. I did no research on that matter, but I feel it's not true. Mapper can do it's job in simple scenarios, being "awesome" in very simple ones (that microsoft love
    to show in demos). But first time you insert inline xslt in your map means you're out of mapper capabilities.
    I agree that if schemas designed well there are less problems. But it's not always the case. Take for instance a good schema reusing a complex type in many elements. What you wanna do is make xslt template for filling such complex type and invoke it
    in your map instead of linking lots of funcdouds and duplicating them all over your map. It's only one example.
    The idea of deriving schemas by replacing those xs:any is interesting. If only it would end with few extra schemas. But making dozens of them is not the kind of job I commited for.
    The thing that makes me angry is that it's not THAT hard to improve mapper. All needed is to make few little changes in right direction. But instead there are interface tweaks.

  • Xslt map in biztalk

    I am trying to use XSLT in map. I am struggling there as not much familiar .
    I created .xslt in visual studio and write required logic. Now I am trying to call it as xslt template . But when I try to do got error "There is not xsl:template node as root node". That is true in my case 
    I have it like this
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 ScriptNS0
    ScriptNS1 userCSharp" version="1.0" xmlns:ns0="http://Zones._870.Internal870" xmlns:s0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006" xmlns:ScriptNS0="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0" xmlns:ScriptNS1="http://schemas.microsoft.com/BizTalk/2003/ScriptNS1"
    xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/s0:X12_00401_870" />
    </xsl:template>
    <xsl:template match="/s0:X12_00401_870">
    If I try to male xslt:tempate as root node I got compile errors for namespace. Can somebody help me how I can call this in map?

    First, yourexample is incomplete, there appears to be no closing <xsl:stylesheet> element.  If this is just a sample, no problem.
    I you intendto use an entire Stylesheet in place of a designer generated Map, which appears to be the case, you do not call it as a Template with the Scripting Functoid.
    Instead, you set the Custom XSLT Path property of the Map (click on the designer surface) and point to the .xslt file. Then, you custom style sheet will be used instead of a generated stylesheet.

  • BizTalk Map - Xslt Issue

    Hi,
    Here is a piece of xslt, i need to replace the characters with their shortcode which are not supported in xml.
    For eg i need to replace '&' to '&amp' and similarly all other characters as mentioned
    Unsupported characters and their replacements:
    & - &amp;
    < - &lt;
    > - &gt;
    " - &quot;
    ' - &#39;
    XSLT:
    <xsl:if test="/*[local-name()='Root' and namespace-uri()='http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1' and namespace-uri()='']/*[local-name()='GetOrderDetailsByIdResponse' and namespace-uri()='http://tempuri.org/']/*[local-name()='GetOrderDetailsByIdResult'
    and namespace-uri()='http://tempuri.org/']/*[local-name()='TermsAndConditionList' and namespace-uri()='http://schemas.datacontract.org/2004/07/GEP.Cumulus.P2P.BusinessEntities']/*[local-name()='TermsAndCondition' and namespace-uri()='http://schemas.datacontract.org/2004/07/Gep.Cumulus.CSM.Entities']/*[local-name()='TermsConditionText'
    and namespace-uri()='http://schemas.datacontract.org/2004/07/Gep.Cumulus.CSM.Entities']/text()">
    <Extrinsic>
    <HeaderExtrinsic>
    <TermsAndConditions>
    <xsl:for-each select="../s10:TermsAndConditionList">
    <xsl:for-each select="s9:TermsAndCondition">
    <xsl:if test="s9:TermsConditionText">
    <TermsAndCondition>
    <xsl:value-of select="s9:TermsConditionText/text()" /> 
    </TermsAndCondition>
    </xsl:if>
    </xsl:for-each>
    </xsl:for-each>
    </TermsAndConditions>
    </HeaderExtrinsic>
    </Extrinsic>
    </xsl:if>
    [Need to do it in the value coming from termandcondition text ie s9:TermsConditionText]
    Thanks in Advance

    Then go back to the source and explain to them that this is not valid XML, and you cannot consume it. Have you tried opening this XML in a web browser? or have an XML Disassemble Pipeline Component consume it?
    It should be 
    <ns5:TermsConditionText>Terms&amp;conditions</ns5:TermsConditionText>
    From the source, otherwise you will not be able to parse it as XML.
    Morten la Cour

  • 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 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.

  • Create null message using BizTalk mapper XSLT

    Hi,
    I have a requirement to check if a message contains a certian value, and if so, throw away the message.  Does anyone know how this could be done using BizTalk mapper/ XSLT?  It's an ESB messaging only solution so don;t want to introduce orchestratons
    / c# code.
    In short is field A = 'yes' the message will be thrown away / made null. 
    Thanks in advance.
    GilesB

    If you consider doing this in Receive-side with some pipeline component, I am afraid you can't eat the data at the receive pipeline. For a null returned, I believe at least a empty message would be published to message box.
    Without orchestration, in message-only scenario one option you can consider is using a custom adapter where you can have your logic whether to send a stream/message out or not. Something like:
    public bool TransmitMessage(IBaseMessage msg)
    _terminate.Enter();
    try
    bool logMessages = Convert.ToBoolean(
    GetAdapterConfigValue(msg.Context, "logMessages")
    if ( logMessages ) {
    SystemMessageContext ctxt = new SystemMessageContext(msg.Context);
    //Add your logic using XPathReader - stream based XPath
    //and check whether the message has the value your're looking for
    bool isFound = false;
    if (!isFound)
    string msgData = "";
    StreamReader reader = new StreamReader(msg.BodyPart.Data);
    using (reader)
    msgData = reader.ReadToEnd();
    // discard the message
    return true;
    } finally {
    _terminate.Leave();
    Above is part of the send adapter code where you add your logic using XPathReader - stream based XPath and check whether the message has the value your're looking for. You can use
    null send adapter as refernce and build your logic where it would check for the required value in your custom adapter.
    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.

  • 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

  • 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.

  • BizTalk TechNet Gurus Announced for June 2014!

    The Results are in! and the winners of the TechNet Guru Competition June 2014 have been posted on the
    Wiki Ninjas Blog.
    Below is a summary, heavily trimmed to fit the size restrictions of forum posting.
     BizTalk Technical Guru - June 2014  
    Steef-Jan Wiggers
    BizTalk Server: Custom Archiving
    TGN: "This one was my favorite this month. Archiving is a topic that is brought up often. Well done explaining it simply and how to do it according to best practice"
    Sandro Pereira: "Love the topic, well explain and with everything you need, my favorite."
    Mandi Ohlinger: "Another great addition to the Wiki. "
    boatseller
    BizTalk: Reducing and Consolidating WCF Serialization Schema Types
    TGN: "Very good, keeping the code clean, and only referencing what you need and consolidate it is important!"
    Mandi Ohlinger: "Great solution to somewhat-annoying behavior. Nice addition to the Wiki!"
    Sandro Pereira: "Great article."
    Murugesan Mari Chettiar
    How to Implement Concurrent FIFO Solution in BizTalk Server
    Ed Price: "Incredibly thorough in your explanations! Great formatting. Good job!"
    TGN: "First in, first out. Great article Murugesan!"
    Sandro Pereira: "Good additional to the TechNet Wiki, good work."
     Forefront Identity Manager Technical Guru - June 2014  
    Remi Vandemir
    Custom Reports in FIM2010R2
    AM: "Great step-by-step guide for generating custom reports. Thanks for taking the time to put this together."
    PG: "Nice article, in an area that is less known!"
    Søren Granfeldt: "Very comprehensive."
    Ed Price: "Great job on the intro, and a lot of images really help clarify all the steps!"
    GO: "Thank you "
    Eihab Isaac
    FIM 2010 R2: Review pending export changes to Active Directory using XSLT
    Ed Price: "Great introduction, great steps, and great job on the image and code formatting!"
    GO: "An introduction, a sample code, images, a TOC and a conclusion. Nothing here to preserve the GOLD medal!"
    PG: "Nice article!"
    Søren Granfeldt: "Nice and precise"
    Scott Eastin
    A Practical Alternative to the PeopleSoft
    AM: "Thank you for sharing. Great (and probably superior) alternative for those using PeopleSoft as import-only data source."
    GO: "Amazing article, love it so much"
    PG: "Would like to see more elaborated details in this article."
    Søren Granfeldt: "A little more technical stuff would be nice"
    Ed Price: "Some good community collaboration in removing blog-like personalization. This is a great topic with some good holistic thinking!"
     Microsoft Azure Technical Guru - June 2014  
    Mr X
    Configuration of WATM (Windows Azure Traffic Manager) for Web Portals hosted
    on Azure VMs
    JH: "Two simple words: Love it! The detailed explanation on how Traffic Manager works is awesome."
    Ed Price: "Wow! Incredibly well written, with beautiful diagrams and a great use of images and tables! Great topic!"
    GO: "This is a great article! Thanks Mr.X"
    Mr X
    How to use Windows Azure as Traffic Manager for Web portals
    hosted in multiple on-premise datacenters
    JH: "Very detailed! Great explanation at the beginning followed by a good step-by-step guide."
    Ed Price: "A much needed article! Great job on the formatting and images!"
    GO: "Thanks again, MR.X"
    Mr X
    How to connect Orchestrator to Windows Azure
    GO: "I really enjoyed reading this article, clever and well written. Lovely done!"
    JH: "Great article! I especially love the amount of pictures provided in the article."
    Ed Price: "Good procedural article! Great use of images!"
     Microsoft Visio Technical Guru - June 2014  
    Mr X
    How to open Visio files without Visio
    AH: "This Article is pretty basic and lacks details. Visio Viewer doesn't just open in IE but also in Outlook and File explorer. The writer should include the link to http://blogs.office.com/2012/11/28/download-the-free-microsoft-visio-viewer/
    this blog which has lot more details "
    Ed Price: "Good. I think the SEO on the title will drive more awareness of the Visio Viewer."
    GO: "Thanks you Mr.X! Again a great article!"
     Miscellaneous Technical Guru - June 2014  
    Ed Price - MSFT
    Yammer: Announcements Feature
    TGN: "Wow, not only is this a good way on how to write annoncments on Yammer, but in generel. Really, really great write-up Ed! T"
    GO: "Tord says on the comment section: "Very nice article, Ed. I really enjoyed reading it and you had a great set of tips. Thanks for sharing!".. I only can respond AMEN! Thanks Ed!"
    Margriet Bruggeman: "Good discussion of announcements feature."
    Anthony Caragol
    Backing Up and Restoring Lync 2013 Contacts
    Margriet Bruggeman: "Short & Sweet"
    GO: "Great article, but I'm missing, examples, images, definitions etc for a huge section like "backup and restore""
    TGN: "Very good, Lync has eaten up the market and is a key product in most companies, articles like this is very valuable. Great work Anthony!"
     SharePoint 2010 / 2013 Technical Guru - June 2014  
    Geetanjali Arora
    SharePoint Online : Working with People Search and User Profiles
    Benoît Jester: "A very good article, a must-read for those interested by SharePoint Online and the use of search and user profile API."
    Jinchun Chen: "Excellent. Just a tip, if you would like to improve the performance, please use the Search Service to search user profiles"
    Craig Lussier: "Good walkthrough and code example for getting started with People Search!"
    Margriet Bruggeman: "Good starter for working with search and profiles"
    Jaydeep Mungalpara
    Creating Bookmarks in Wiki Pages - SharePoint Rich Text Editor Extension
    Margriet Bruggeman: "Really cool! In the past, I was actually looking for this and its a nice implementation of this functionality. This article gets my vote!"
    Craig Lussier: "Great solution for extending out of the box functionality. I like the synergy between the TechNet Wiki and TechNet Gallery!"
    GO: "Simple but powerfull. We should all take an example about how this article has been written. This article has a TOC, headings and even a code! Well done!"
    Jinchun Chen: "Nice. "
    Benoît Jester: "A simple button which can save a lot of time!"
    Dan Christian
    PowerShell to copy or update list items across SharePoint sites and farms
    GO: "The best artice for June! Thanks Dan, you deserve the GOLD medal!"
    Benoît Jester: "A good article with useful scripts, as they can be used fior many scenarios (data refresh, migration tests, ...)"
    Jinchun Chen: "Good and low-cost solution. To be automatic, we can use EventHandle instead. "
    Craig Lussier: "Nice PowerShell script solution and explanation of the scenario. Consider using functions with parameters for easier reuse so input parameters are not hard coded."
    Margriet Bruggeman: "This script can be useful, although typically migration scenarios are more complex than this. Having said that, I probably end up using this script some time in in the future"
     Small Basic Technical Guru - June 2014  
    litdev
    Small Basic: Sprite Arrays
    Ed Price: "An important topic that's well described with fantastic examples! Great article!"
    Michiel Van Hoorn: "Great starter for Sprite Fundamentals and how to handle them. Briljant start point for greating you 2D shooter"
    Jibba Jabba
    Small Basic - Monthly Challenge Statistics
    Ed Price: "Jibba Jabba brings us astonishing insights and data about LitDev's Small Basic Monthly Challenges!"
    RZ: "This is very nicely done and showed all the statistics visually"
    Nonki Takahashi
    Small Basic: Challenge of the Month
    RZ: "This is very nicely done and organized all challenges of the month in one place"
    Ed Price: "Although this is very basic, it's incredibly helpful to get all these in one list and to access all the great challenges!"
    Michiel Van Hoorn: "Good explainer on  fundamental structures."
     SQL BI and Power BI Technical Guru - June 2014  
    Anil Maharjan
    Using Power Query to tell your story form your Facebook Data
    Jinchun Chen: "Interesting. I liked this best"
    PT: "Plenty to like here" 
    Ed Price: "Great! I love to see Power Query articles like this! Great formatting and use of images!"
    Tim Pacl
    SSRS Expressions: Part 1 - Program Flow
    PT: "A very comprehensive article about program flow expressions. Nice job. I'm sure many will benefit from this article. Just a little feedback about some terminology that could be more clear: The entire statement that
    is typically used to set a property value for an object in an SSRS report is an "expression". Each of the three programming constructs you've mentioned (e.g. IIF, SWITCH & CHOOSE) are "functions" and not expressions or statements."
    Jinchun Chen: "Perfect! Good article for SSRS newbie." 
    Ed Price: "The table and images help bring it more value. Great job!"
    Anil Maharjan
    How to Schedule and Automate backups of all the SSAS catalogs within the
    Server Instance
    PT: "This is a very useful article about automating multiple Analysis Services database backups using an SSIS package and the SQL Server Agent. Nice job."
    Jinchun Chen: "Good." 
    Ed Price: "Good use of images. Could be improved with better code formatting. Good job!"
     SQL Server General and Database Engine Technical Guru - June 2014  
    Shanky
    SQL Server: What does Column Compressed Page Count Value Signify
    in DMV Sys.dm_db_index_physical_stats ?
    DB: "Interesting and detailed"
    DRC: "• This is a good article and provides details of each and every step and the output with explanation. Very well formed and great information. • We can modify the create table query with “DEFAULT VALUES". CREATE TABLE [dbo].[INDEXCOMPRESSION](
    [C1] [int] IDENTITY(1,1) NOT NULL, [C2] [char](50) NULL DEFAULT 'DEFAULT TEST DATA' ) ON [PRIMARY]"
    GO: "Very informative and well formed article as Said says.. Thanks for that great ressource. "
    Durval Ramos
    How to get row counts for all Tables
    GO: "As usual Durva has one of the best articles about SQL Server General and Database Engine articles! Thanks, buddy!" "
    Jinchun Chen: "Another great tip!"
    PT: "Nice tip" 
    Ed Price: "Good topic, formatting, and use of images. This would be far better if the examples didn't require the black bars in the images. So it would be better to scrub the data before taking the screenshots. Still a good article. Thank
    you!"
     System Center Technical Guru - June 2014  
    Prajwal Desai
    Deploying SCCM 2012 R2 Clients Using Group Policy
    Ed Price: "Great depth on this article! Valuable topic. Good use of images."
    Mr X
    How to introduce monitoring and automatic recovery of IIS application
    pools using Orchestrator
    MA: "Good job Mr X, However I would like to see this runbook integrated as a recovery task with Operations Manager IISapppools Monitors in order to maintain a standard way of notifications and availability reporting."
    Ed Price: "Good formatting on the images, and great scenario!"
    Prajwal Desai
    How to deploy lync 2010 using SCCM 2012 R2
    Ed Price: "Great job documenting the entire process!!!"
     Transact-SQL Technical Guru - June 2014  
    Saeid Hasani
    T-SQL: How to Generate Random Passwords
    JS: "I loved the article, well structured, to the point. Not missing any caveats that might occur, really good in the end. I would suggest changing the function to accept a whitelist / blacklist as well as a length of
    the password to be created. This would be the cherry on the pie :-)"
    Samuel Lester: "Very nice writeup for a real world problem!"
    Richard Mueller: "Clever and apparently well researched. I liked the detailed step by step explanations."
    Jinchun Chen: "Excellent!"
    Manoj Pandey: "A good and handy utility TSQL that I can use and levarage if I have to use similar feature in future."
    Hasham Niaz
    T-SQL : Average Interval Length
    Richard Mueller: "A good article, but I need more explanation of the concepts."
    Manoj Pandey: "A handy TSQL script that I can use and levarage if I have to use similar feature in future."
    Visakh16
    T-SQL: Retrieve Connectionstring Details from SSIS Package
    Manoj Pandey: "Good shortcut by using TSQL with XML to read metadata information from SSIS XML file."
    Samuel Lester: "Handy trick, thanks for posting!"
    Richard Mueller: "Good code, but more explanation needed. Could use a See Also section."
     Visual Basic Technical Guru - June 2014  
    The Thinker
    Better to Ask for forgiveness then permission
    Richard Mueller: "Good use of images and code. The humorous title might be better in a blog."
    MR: "Great topic!"
    GO: "Well, to be honnest, many people worked on that article, but still, the owner "the thinker" should receive the credits! muchos gracias "The Thinker" for the Most Revised Article"
     Visual C# Technical Guru - June 2014  
    Jaliya Udagedara
    Entity Framework Code First - Defining Foreign Keys using Data Annotations
    and Fluent API
    Ed Price: "Wow. Good descriptions, great code snippets, and great job highlighting sections on your images!"
    GO: "Thank you."
     Wiki and Portals Technical Guru - June 2014  
    XAML guy
    History and Technology Behind the TechNet Wiki Ninja Belt Calculator
    Ed Price: "It's amazing to see all the details of what this tool does. Great job on the descriptions and formatting the images and text!"
    Richard Mueller: "Great documentation. Good links to explain everything."
    GO: "I love your articles XAML guy! Always clear and always a pleasure to read! Thanks for you help and commitment for this tool."
    Durval Ramos
    HTML5 Portal
    Ed Price: "This is great to see this HTML5 resource!"
    Richard Mueller: "A great contribution to our collection of portals"
    GO: "The HTML5 Portal is A-W-E-S-O-M-E !"
    João Sousa
    ASP.NET Portal
    Ed Price: "Good job on this portal! The Return to top links are helpful!"
    Richard Mueller: "More should be done to distinguish this portal from
    here."
    GO: "Thanks Joao!"
     Windows Phone and Windows Store Apps Technical Guru - June 2014  
    Dave Smits
    Theming of your application
    Peter Laker: "Another great article from the mighty Dave. Very useful. Not sure if MS like us want us to work around the accents so much though ;)"
    Ed Price: "Very useful topic and great formatting on the code! Could benefit from more explanation on the code toward the bottom and a See Also section. Great article!"
    saramgsilva
    Creating Windows Phone and Window 8.1 applications using Microsoft App Studio
    Peter Laker: "A great introduction! Nice walkthrough, and plenty to look at!"  
    Ed Price: "This is good. I love the narrative and use of images! Good conclusion!"
    Carmelo La Monica
    Create Universal Application with Windows Phone App Studio (en-US).
    Peter Laker: "Sensational article. A real attention grabber and written very clearly."  
    Ed Price: "Fantastic job on the narrative and images. Some amazing articles this month!"
     Windows Presentation Foundation (WPF) Technical Guru - June 2014  
    Magnus (MM8)
    WPF: How To Tab Between Items In a ListBox
    KJ: "This article seemed very useful to me. The kind of thing that I might need and here's the answer."
    GO: "Thanks for that great article!."
    Ed Price: "Another amazing article from Magnus! Great job on the topic choice (very needed scenario), formatting, code, explanations, and See Also section. Fantastic article!"
    Sugumar Pannerselvam
    Lets forget about limitations and temprorary fix... Think about 4.5 features
    KJ: "Wish there were code samples and more flushed out scenarios"
    GO: "Why second place? the layout and way to explain didn't convince me. Doesn't mean that the article is bad. The article is awesome; but it's missing something."
    Ed Price: "Short and sweet. Could benefit from adding in some code snippet examples and images. Good topic choice."
     Windows Server Technical Guru - June 2014  
    Mr X
    DHCP on Windows Servers – Why are the expired IP addresses not getting re-assigned?
    JM: "This is an excellent article, thanks for your contribution."
    Richard Mueller: "Important information with good explanation. Needs a See Also section."
    Philippe Levesque: "Good article ! I like how it's explained versus Windows Server. An image with the DHCP's process could be a good addition for reference. (DHCP OFFER, DHCP ACK, etc..)"
    Mr X
    How to force a DHCP database cleanup for expired leases in a specific scope
    GO: "I'm actually thinking that nobody can defaut you Mr.X"
    Philippe Levesque: "Good article ! I would add that changing the lease time to be shorted could help too."
    JM: "A very good article, however you might consider adding this content as a section in your article about expired IP addresses in DHCP"
    Richard Mueller: "More good information. Should be linked to the other DHCP article."
    GL: "This is OK but a better solution for a highly utilized DHCP scope would be to shorten the lease time and/or configure a superscope."
    Hicham KADIRI
    Windows Server Core 2012 R2 - Initial configuration
    GL: "This is good required information. I would really like to see information added about how to add a server role. You might consider providing PowerShell alternatives to the netsh and other commands."  
    JM: "This is a great to-the-point article on how to configure a Core install of Windows Server, nice work."
    Richard Mueller: "A great collection of useful tools. Some could use images, more detail, or examples. The example sections could be added to the Table of Contents."
    GO: "Well, our new french MVP! Well written Hicham! Do not forget to pray attention for the layout! It's capital for readers and judges!"
    Philippe Levesque: "I like the article, a good resumé of the command you need to do to configure a server."
    Don't forget the full version, with runners up is available
    here.
    More about the TechNet Guru Awards:
    TechNet Guru Competitions
    How it works
    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and only
    TechNet Wiki, for future generations to benefit from! You'll never get archived again!
    If you are a member of any user groups, please make sure you list them in the
    Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

    Congrats to Steef-Jan, Boatseller, and Murugesan! And thanks to all the contributors! Great articles this month!
     BizTalk Technical Guru - June 2014  
    Steef-Jan Wiggers
    BizTalk Server: Custom Archiving
    TGN: "This one was my favorite this month. Archiving is a topic that is brought up often. Well done explaining it simply and how to do it according to best practice"
    Sandro Pereira: "Love the topic, well explain and with everything you need, my favorite."
    Mandi Ohlinger: "Another great addition to the Wiki. "
    boatseller
    BizTalk: Reducing and Consolidating WCF Serialization Schema Types
    TGN: "Very good, keeping the code clean, and only referencing what you need and consolidate it is important!"
    Mandi Ohlinger: "Great solution to somewhat-annoying behavior. Nice addition to the Wiki!"
    Sandro Pereira: "Great article."
    Murugesan Mari Chettiar
    How to Implement Concurrent FIFO Solution in BizTalk Server
    Ed Price: "Incredibly thorough in your explanations! Great formatting. Good job!"
    TGN: "First in, first out. Great article Murugesan!"
    Sandro Pereira: "Good additional to the TechNet Wiki, good work."
    Also worth a mention were the other entries this month:
    BizTalk Server and Sentinet - Protocol Mediation REST to SOAP by
    Steef-Jan Wiggers
    Ed Price: "Thanks for digging into this important topic. Amazing job on the diagrams and images!"
    Sandro Pereira: "Was missing this topic in the TechNet Wiki, great article!"
    TGN: "You've put a lot of effort into this one. Sentinet is a good addition to BizTalk development, great work Steef-Jan."
    BizTalk: Passing variables into maps by
    Alastair Grant
    Mandi Ohlinger: "Nice use of the ThreadStatic attribute!"
    TGN: "Nice article, and it is true every now and then you need that variable into the map!"
    Sandro Pereira: "Good example, however this approach comes with little performance hit also and in some scenarios you can also find yourself in particular dangerous situation, for example if you don’t validate if the static singleton instance
    object still exist or not in the code you obtain “object reference not set to an instance of an object”"
    BizTalk: SQL Patterns for Polling and Batch Retreive by
    boatseller
    Sandro Pereira: "Good work and good article."
    Ed Price: "Good topic with great use of images and code formatting!"
    TGN: "This is really good. I can see you spent time on this one. Great work!"
    BizTalk Server : Scheduling Orchestration using Trigger Message by
    Maheshkumar S Tiwari
    Mandi Ohlinger: "This is a must-read when using scheduled receive in BizTalk! LOVE the Codeplex adapter. "
    Sandro Pereira: "As one of the persons in charge for this adapter... I must say I love it!"
    TGN: "Good one, an article that is very valuable for the community."
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to define myself transform function in a xslt document???!!

    "XSL Transformations (XSLT) Version 1.0"(http://www.w3.org/TR/1999/REC-xslt-19991116)
    have "Additional Function" and "Extension Functions".
    It is easy to define a transform function with ms biztalk mapper.
    but how to do with weblogic or with Apache Xalan????!!!!!!
    pleasy give me a sample!!!!!!!!!!!!
    thanks!!!!!!

    look at the samples bea\wlserver6.0sp1\samples\examples\xml
    ~
    Namaste - I bow to the divine in you
    ~
    Filip Hanik
    Software Architect
    [email protected]
    www.filip.net
    "xp" <[email protected]> wrote in message
    news:3b52ff86$[email protected]..
    >
    "XSL Transformations (XSLT) Version1.0"(http://www.w3.org/TR/1999/REC-xslt-19991116)
    have "Additional Function" and "Extension Functions".
    It is easy to define a transform function with ms biztalk mapper.
    but how to do with weblogic or with Apache Xalan????!!!!!!
    pleasy give me a sample!!!!!!!!!!!!
    thanks!!!!!!

  • UDF in XSLT Mapping.

    Hi,
    Can I use a UDF in XSLT mapping. If yes, can anyone please guide me in the issue. When I searched the forum there is a discussion related to the attachment of Java classes to the XSLT mapping. Does this replace the use of a UDF ? Instead, can we opt for a Java Mapping. Which will be of more help? Kindly suggest your opinions with relevant explanation.  Thank you very much for your time.
    Krishna.

    Hi krishna,
    check this links
    http://www.topxml.com/rbnews/XML/re-55178_Remove-empty-nodes-in-BizTalk-by-using-XSLT.aspx
    http://www.topxml.com/rbnews/XML/re-55176_XSLT-performance-when-mapping-large-documents-in-BizTalk.aspx
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
    XI: New features in SP14
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
    How to parse "XX/YY/ZZ;AA/BB/CC;11/22/33" in message mapping.
    What is UDF
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    Java Mapping (Part I)
    Difference in using java,xslt,message mapping
    Java Mapping (Part I)
    Java Mapping (Part II)
    Java Mapping (Part III)
    Testing and Debugging Java Mapping in Developer Studio
    Using JAXP to both parse and emit XML in XI Java mapping programs
    "JAVA MAPPING", an alternate way of reading a CSV file
    Think objects when creating Java mappings
    Regards
    srinivas

  • Save all details error in Exception Block of BizTalk

    In orchestration A,I make a Exception Block ,created a System.Exception object and saved Exception Error in a string and checking it in admin console.
    In my orchestarion, I got amount value from a element Amount, used a custom xslt and in that custom xslt, I used a C# function for desired calculation for the value of amount.
    Now when,input string of amount is not in a correct format then a error is saved regarding mapping  as follows:
    Transformation failed for Map A.
    But the actual error is as follows:
    input string was not in a correct format.
    How can I get this error in  exception handler block?
    Prakash

    Hi Prakash,
    Like you have mentioned that you are using Custom XSLT, my advice will be that you can raise an exception from within an XSLT template, based on the value.
    <xsl:message terminate="yes">Custom error text</xsl:message>
    This will cause the XSLT engine to stop processing immediately, and raise an exception.   This exception, including the custom error text contained within the message segment,
    can be caught in the BizTalk Orchestration engine by explicitly catching an exception of type 
    Microsoft.XLANGS.BaseTypes.TransformationFailureException.
    Refer: Biz Talk : How To : Throw Custom Exception in Map
    For step-by-step explanation on this refer: Flowing clear error messages from transforms
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Xslt map issue

    Hi ,
    any one help me , i need add one text to map  for each output .
     as per need add sample, befor generating output.
    as per  script my generate wrong out put 
    <xsl:template name ="tText">
        <xsl:param name="paramone"/>
        <xsl:variable name="text2" select="$paramone"/>
        <xsl:if test="$paramone !=''">
          <xsl:element name="ghf" >
            <xsl:value-of select="concat('sample',$text2)"/>
          </xsl:element>
        </xsl:if>
    input file:
    <F>
      <S>
            <a >sample1</a>
             <a >sample2</a>
     </s>
    </F>
     output:
    i want output like :      sample 
                                         sample1
                                         sample2
    wrong ouput :                       sample  sample1
                                                  sample  sample2

    Your sample input is not valid XML! The closing tag </s> does not match the opening tag <S>. 
    If you use the following input:
    <F>
    <S>
    <a>sample1</a>
    <a>sample2</a>
    </S>
    </F>
    And apply the following custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <xsl:element name="{.}" />
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    You get the following output:
    <sample>
    <sample1 />
    <sample2 />
    </sample>
    If however you want this output (I'm not sure by your description):
    <sample>
    <ghf>sample1</ghf>
    <ghf>sample2</ghf>
    </sample>
    You can use this custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <ghf>
    <xsl:value-of select="." />
    </ghf>
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    Morten la Cour

Maybe you are looking for

  • SAP Library Download.  Is it possible...??/

    Hi all, Is it possible that I can download SAP Library from internet and study LSMW from that....??? Please give me some links if its possible.  I have internet access at work and I dont have internet access at my home orelse I would use help.sap.com

  • Copy cost centers & profit centers to a new Company

    Hello, What's the transactions or customizing path to copy cost and profit centers to a new company ? Best reagards Paul

  • Have search results from awesome appear in a new tab

    Firefox 4 - using the awesome for search. I'd like the search results to show up in a new tab. They currently over-write the existing tab. I found in about:config a browser.search.opennewtab (or something close to that) and changed it to true, but th

  • Bluetooth Headset won't stay connected under 10.6

    My PS3 headset use to stay connected under leopard but something in snow leopard doesnt like it. If I can get it connected it'll stay connected for a min. And i cant get the input meter to pickup any audio from the device. However on my iPhone and PS

  • Need *.Jar for KM Developement

    Hi All, I would appreciate if anyone could send me the *.jar files for KM Development which needs to be intergrated in to NWDS. My Mailid is [email protected] , Thank you