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.

Similar Messages

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

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

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

  • 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

  • Exit a loop from custom xslt

    My custom xslt is as follows which I am using in my map:
    <?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:var="http://schemas.microsoft.com/BizTalk/2003/var"
                    exclude-result-prefixes="msxsl var s0 userCSharp" version="1.0" xmlns:s0="http://Students.Student.SourceSchema"
                    xmlns:ns0="http://Students.Student.DestinationSchema"
                    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:Students" />
      </xsl:template>
      <xsl:template match="/s0:Students">
        <ns0:DestinationDetails>
          <xsl:for-each select="StudentTransactions">
            <xsl:if test="FName='H'">
              <xsl:variable name="var:v104" select="ID"/>
              <xsl:for-each select="/s0:Students/StudentTransactions[FName='D' and ID_Detail=$var:v104]">
                <xsl:variable name="Detail_String" select="string(GL_String/text())"/>
                <xsl:if test="$Detail_String!=''">
                  <Details>
                    <HeaderSegment>
                    </HeaderSegment>
                  </Details>
                  </xsl:if>
              </xsl:for-each>
            </xsl:if>
          </xsl:for-each>
        </ns0:DestinationDetails>
      </xsl:template>
      <msxsl:script language="C#" implements-prefix="userCSharp">
        <![CDATA[
    public string StringConcat(string param0)
       return param0;
    ]]>
      </msxsl:script>
    </xsl:stylesheet>
    I want to break the following loop : 
    <xsl:for-each select="/s0:Students/StudentTransactions[FName='D' and ID_Detail=$var:v104]">
    when  <xsl:if test="$Detail_String!=''"> condition is true.
    Any kind of  help would be appreciated.
    Prakash

    Got your point. The counter is not incrementing because, varialbes are immutable in XSLT, i.e. they can't be changed. I think what you need to do is use the position(). With the
    resultset of For-each, using position()=1 in <xsl:if test="position() =1 , you would just access the first record of the resultset
    from for-each
    If my understanding of your problem is correct, then the following XSLT shall work for you.
    <?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:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 userCSharp" version="1.0" xmlns:s0="http://CallTemplate_Increment.StudentSchema" xmlns:ns0="http://CallTemplate_Increment.DestinationStudentSchema" 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:Students" />
    </xsl:template>
    <xsl:template match="/s0:Students">
    <ns0:DestinationDetails>
    <xsl:for-each select="StudentTransactions">
    <xsl:if test="FName='H'">
    <xsl:variable name="var:v104" select="ID"/>
    <xsl:variable name="count" select="0"/>
    <xsl:for-each select="/s0:Students/StudentTransactions[FName='D' and ID_Detail=$var:v104]">
    <xsl:variable name="Detail_String" select="string(GL_String/text())"/>
    <!--<xsl:if test="$Detail_String!='' and $count=0">-->
    <xsl:if test="position() =1 and $Detail_String!=''" >
    <xsl:variable name="var:v1" select="userCSharp:StringConcat(string(FName/text()) , string(LName/text()))" />
    <Details>
    <ID>
    <xsl:value-of select="ID/text()" />
    </ID>
    <FullName>
    <xsl:value-of select="$var:v1" />
    </FullName>
    <Cost>
    <xsl:value-of select="Cost/text()" />
    </Cost>
    </Details>
    <!--<xsl:value-of select="$count + 1"/>-->
    </xsl:if>
    </xsl:for-each>
    </xsl:if>
    </xsl:for-each>
    </ns0:DestinationDetails>
    </xsl:template>
    <msxsl:script language="C#" implements-prefix="userCSharp">
    <![CDATA[
    public string StringConcat(string param0, string param1)
    return param0 + param1;
    ]]>
    </msxsl:script>
    </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.

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

  • XML-webpart, XML-list query and custom XSLT

    I am managing some lists on SharePoint 2007. And I need to present different parts of my lists using the XML-query (XMLDATA=TRUE) URL for the list.
    The XML from the URL is fine, and I am able to save the XML as a file and used custom XSLT to present the list as needed...locally.
    The Saved XML-file is however static, and subsequent changes to the content of the list in SharePoint will not be reflected.
    I am currently attempting to load the XML directly from the "XMLDATA=TRUE" URL via the "link" form in the XML WebPart. But for some reason I get "Failed to apply XSLT to the content." for this operation.
    I was worried for a while that for some reason the XSLT was buggy. But testing the following offline works fine:
    ./msxsl.exe -xw -o  list.html list.xml list.xslt
    Where "list.xml" is the XML-file displayed and saved from the (XMLDATA=TRUE) URL for the list.
    -To attempt a debug on XSLT issues I even entered a bare XSLT in the WebPart:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    </xsl:template>
    </xsl:stylesheet>
    But sadly this does not seem to have any effect on the Error-message displayed.
    I would appreciate very much if someone somewhere had a hint on where to go from here.
    /Mikael

    Well...it seems the obvious slipped my mind I'll close the question.
    I guess it's a bit far fetched to ask SharePoint to serve the URL as an XML-file if the result of the call to the URL is not an XML-file itself.
    But I am still working for a fix somehow.
    It seems I have to dig into the Sphagetti code of Sharepoint to create a single page using a customer Master to hold the XML-file via ASPX...
    Seems a bit cumbersome...but it may just work.

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

  • XPath Error after using custom xslt

    I made a mapping between my input schema and destination schema through custom xslt.
     After constructing the message when I fetch the destination schema element value through xpath it does not contains
    any value but when I saved that destination message in a location then I got all the elements value.
    When I want to update the value of any element then it shows the following error :
    The XPath expression: ' xpath of element '
    selected a node which is not valid for property or distinguished field retrieval, or it selected no node at all. Only text-only elements or attributes may be selected.
    The xpath is correct.
    Why this is occuring ?
    While I am not using any custom xslt, it is working fine.
    Any kind of help would be appreciated.
    Prakash

    Look like you're trying to use a XPath for an element/node which doesn't exist in the received message.
    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.

  • Calling Custom XSLT java class from BPEL in SOA Suite 11g

    Hi All,
    Morning...need some help with this issue...we are currently on SOA Suite 11g (11.1.1.4) version.
    Earlier while we were on SOA Suite version 10g (10.1.3.3) we were calling the custom java classes from the xsl mapping for complex transformation and for this we were placing the .class file as .jar file at the location mentioned here $OC4J_HOME/j2ee/home/applib directory and then mentioning the namespace as http://www.oracle.com/XSL/Transform/java/{$classname$} in the XSLT mapping file.
    Now in SOA Suite 11g if we need to retain similar functionality for external custom java calls could someone please help us where do we need to put the .jar file now ..
    exactly at which directory location/path and on which instance/server (application server instance or middle tier instance ) we need to put this .jar file
    Currently we are stuck and need some help with this.
    With thanks & Regards

    Hi Eric & Anuj,
    Thanks for replying , sorry for checking on this now...
    here at this path /opt101/app/oracle/SOAD/SOA11gR1/fmw/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1
    we got the ora.soa.ext.jar file and extracted it to get the MANIFEST.mf file ..have mentioned below.
    Now if we need to link our custom .jar file named customfunctions.jar so we need to mention it as below is this correct :
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 17.0-b17 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle
    Implementation-Title: Oracle SOA EXT
    Implementation-Version: 11.1.1
    Product-Name: Oracle SOA EXT
    Product-Version: 11.1.1.4.0
    Specification-Version: 11.1.1
    Extension-Name: oracle.soa.ext
    Class-Path: classes/
    Class-Path:customfunctions.jar classes/ -- is this the way to mention (means we need to add this additional line or we need to add to the existing line at Class-Path: classes/)
    2.
    Eric the Alternative method mentioned in your update :
    Open a command prompt and change the current directory to the oracle.soa.ext_11.1.1 directory ,
    then execute the build.xml file in the oracle.soa.ext_11.1.1 folder using Ant
    Now could someone please guide us regards this ANT means how does it work and its relation to the build.xml file and how do we check whether we have ANT utility available or not..
    not much conversant with this ANT hence asking here..would lookout for your reply
    thank you

  • Custom XSLT Functions - Unable to access in Mediator ExpressionBuilder

    I have created some custom functions, I am able to access them within the xslt mapper, but when I open Mediator Expression Builder I cannot access them. Is this by design, bug, enhancement request, trick to get get it work?

    yes was able to activate the functions, no error, but i dont want to build everything and in the end when tested in the schema and found out that wasnt able to call the codes, would rather pre-emp during the build

  • Split an XML File and invoke a Web Serivce for each splits using an  XSLT

    Hi,
    We Have a requirement to Split an incoming XML File into chunks based on a child element and hit the target Web Service for each and every split ( i.e no of splits = no of hits on WebService).
    Currently, the incoming XML file is getting splitted and gets appended to the SAME Payload and the WebService is hitted only once with the entire Payload.
    Is it possible to invoke a WebService within a XSLT ?
    Please find below the XSLT code used to split the file in chunks of 3
    <xsl:param name="pItemsNumber" select="3"/>
    <xsl:template match="@*|node()">
    <xsl:choose>
    <xsl:when test="count(Batch/Item) > 4">
    <ItemMaintenance>
    <xsl:for-each-group select="Batch/Item"
    group-adjacent="(position()-1) idiv $pItemsNumber">
    <xsl:result-document href="ItemsMatch\{current-grouping-key()}.xml">
    <ItemMaintenance>
    <xsl:copy-of select="current-group()"/>
    </ItemMaintenance>
    </xsl:result-document>
    </xsl:for-each-group>
    </ItemMaintenance>
    </xsl:when>
    <xsl:otherwise>
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>

    Hello,
    It is possible to invoke a webservice from XSLT. To achieve this you must create a custom XSLT function that does the actual webservice call. You need to write an implementation in Java for this. See my blogpost http://blog.melvinvdkuijl.nl/2010/02/custom-xslt-functions-in-oracle-soa-suite-11g/ for a simple example.
    Regards,
    Melvin

  • 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

  • Regarding making hyperlink in OOPs ALV

    Please see the following ALV Code. Its based on OOPs. There is no fieldcatalog defined in the program. In the output I want to make a hotspot on the filed VBELN & want to call T.code VA03 using SET PARAMETER ID. Please help. If I would have made it t

  • Open Session: unexpected error

    Hi everybody, I'm using BO XI R3.0 and since couple of last days I'm having problem with opening Universe Designer. The message I'm getting is "Open session: unexpected error". This happens after I provide user name and password for the access to the

  • How to change text in header of ADF Swing JTable?

    I need to change texts in ADF Swing JTable header. any clue? thanks Branislav

  • Filewatcher frustration

    I am testing out the new filewatcher functionality in 11gR2. However, I cannot seem to get it to work and the dba_scheduler* views are reporting that it is succeeding, but nothing is being written to the table. The steps I am following are at http://

  • How can i see hidden files in macBook air?

    how can i see the hidden files in macbook ,  i dont know how to unhide it and i dont know how to hide it also.