Adding a new namespace through Inline xslt in Biztalkmapper in VisualStudio2010


  • Hello everyone,

    Am writing some InlineXslt script in scripting functoid of BizTalk(2010) mapping file in VisualStudio2010.(It supports only version 1.0).

    I need to use current date-time at many places in my xslt script. To get current date-time, I was using Date-time functoid or writing some C# code in one scripting functoid and passing it as a parameter to another scripting functoid(where xslt script is written).

    But now if I generate xsl file out of mapper, it contains C# namespace and C# code.

    Now I want to do it using only xslt. I want to include EXSLT namespace (http:/ and  extension-element-prefixes="date" , and use a function "date:date-time()" to get current date and time.

    Instead of modifying the generated xsl file, I want to acheive this at an earlier stage so that when I generate xsl file out of Biztalk mapper, it contains only xslt script.

    Is it possible to include this namespace in InlineXslt or Inlinexslt template of scripting functoid, so that I can use the function date-time() while writing xslt script in functoid.

    Any suggestions would be really helpful. Thank you.

    Tuesday, January 14, 2014 1:35 PM


  • Hi,

    Try this.

    <!-- This will get the current date time in variable CurrentDate -->

    <xsl:variable  name="CurrentDate" >
           <xsl:value-of select="current-dateTime()"/>

    Then you can use the CurrentDate variable in your xslt.

    Refer this link for more XSLT functions.

    Hope this will help.



    Sumit Verma - MCTS BizTalk 2006/2010 - Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Wednesday, January 15, 2014 6:26 AM

All replies