Skip to Content
avatar image
Former Member

Current Date in XSLT 1.0 Mapping

Hi All,

Very Good Morning...

I have one issue my XSLT mapping, One filed is required current date and time.But in XSLT 1.0 there is no standard date function. But XSLT 2.0 version is aviable.

I am using the XSLT1.0 version.i saw in SDN some threads are related to this issue. XSLT supported for Java extensions.

Upto now i am n't working with JAVA mapping. How i can create a JAVA extension and how i can import to Integration Respoistery....

Kindly give me suggestion about this issue.

Thank you very much.

Sateesh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 16, 2010 at 06:31 AM

    Dear Sateesh,

    Declare xlst variables at start of xsl program like below

    <xsl:output method="xml" indent="yes"/>

    <xsl:variable name="today_formatted" select="java:java.text.SimpleDateFormat.new('yyyyMMdd')"/>

    <xsl:variable name="time_formatted" select="java:java.text.SimpleDateFormat.new('HHmmss')"/>

    and use them in xsl mapping

    <xsl:value-of select="substring(concat(java:format($today_formatted, $date),$blanks),1,8)"/>

    <xsl:value-of select="substring(concat(java:format($time_formatted, $date),$blanks),1,6)"/>

    thanks,

    madhu

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Madhusudhan,

      Thanks for your suggestion.

      I tried it what you given the format, I am geeting error in XSLT mapping.I am n't geeting the error report.

      Thank you .

      Sateesh

  • avatar image
    Former Member
    Jun 16, 2010 at 07:47 AM

    Hi All,

    Kindly suggest me about my issue.

    Thank you

    Sateesh

    Add comment
    10|10000 characters needed characters exceeded