none
Adding a new namespace through Inline xslt in Biztalkmapper in VisualStudio2010

    Question

  • 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:/exslt.org/dates-and-times) 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

Answers

  • Hi,

    Try this.

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

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

    Then you can use the CurrentDate variable in your xslt.

    Refer this link for more XSLT functions.

    Hope this will help.

    HTH,

    Sumit


    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

  • Hello,

    Welcome to MSDN forum.

    This forum is mainly to discuss and ask questions about Visual Studio Extensibility (VSX), using the Extension Manager, building VSIX containers for deployment, the Visual Studio SDK, Text Templates (T4), add-ins, macros, and more.

    Since this issue is about BizTalk, I will move it to BizTalk Server General  forum for better response.

    Thanks for your understanding.

    Best Regards,

    Jane.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 15, 2014 1:28 AM
  • Hi,

    Try this.

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

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

    Then you can use the CurrentDate variable in your xslt.

    Refer this link for more XSLT functions.

    Hope this will help.

    HTH,

    Sumit


    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
  • Same question has been posted here by the user. http://social.msdn.microsoft.com/Forums/en-US/591386e3-c534-4484-a9cd-2e7b87b7e3d6/adding-a-new-namespace-through-scripting-functoidinline-xslt-in-biztalkmapper-in-vs2010?forum=biztalkgeneral

    Just keep one the post and close the other..


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Wednesday, January 15, 2014 9:37 AM