Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3756902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:55:25+00:00 2026-05-19T09:55:25+00:00

The following code <td> <xsl:call-template name=date:add> <xsl:with-param name = date-time select =hml:LT /> <xsl:with-param

  • 0

The following code

<td>
    <xsl:call-template name="date:add">
      <xsl:with-param name = "date-time"  select ="hml:LT" />
      <xsl:with-param name = "duration"   select = "'PT1H'" />
    </xsl:call-template>
  </td>
  <td>
    <xsl:call-template name="date:format-date">
      <xsl:with-param name = "date-time"  select ="hml:LT" />
      <xsl:with-param name = "pattern"   select = "'dd, MMM yyyy'" />
    </xsl:call-template>
  </td>

outputs something like

<td>2011-01-18T07:27:24-00:00</td><td>18,  2011</td>

The second cell doesn’t contain name of month (MMM in pattern)

At the same time code below works fine

 <td>
    <xsl:call-template name="date:format-date">
      <xsl:with-param name = "date-time"  select ="hml:LT" />
      <xsl:with-param name = "pattern"   select = "'dd, MMM yyyy'" />
    </xsl:call-template>
  </td>

i.e. without date:add call before I get right date in output:

<td>18, Jan 2011</td>

Is it defect in EXSLT? Or I do something wrong?

I use EXSLT extensions to XSLT and all necessary templates are imported.

Here are full text of test files:
XSLT:

 <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:date="http://exslt.org/dates-and-times" 
    xmlns:hml="http://schemas.test/hml"
    extension-element-prefixes="date"
    exclude-result-prefixes = "hml"
    >

<xsl:import href="date.add.template.xsl" />
<xsl:import href="date.format-date.template.xsl" />
<xsl:import href="str.padding.template.xsl" />


<xsl:output omit-xml-declaration="yes" />
<xsl:output method="html" indent="no" />

 <xsl:template match="/">
    <td>
    <xsl:call-template name="date:add">
      <xsl:with-param name = "date-time"  select ="hml:LT" />
      <xsl:with-param name = "duration"   select = "'PT1H'" />
    </xsl:call-template>
  </td>
  <td>
    <xsl:call-template name="date:format-date">
      <xsl:with-param name = "date-time"  select ="hml:LT" />
      <xsl:with-param name = "pattern"   select = "'dd, MMM yyyy'" />
    </xsl:call-template>
  </td>
  </xsl:template>
</xsl:stylesheet>

and XML:

<hml:LT xmlns:hml="http://schemas.test/hml">2011-01-19T02:16:06-00:00</hml:LT>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:55:25+00:00Added an answer on May 19, 2026 at 9:55 am

    I tested your samples with Saxon 6.5.5 and xsltproc on Windows and the output both times is as follows:

    <td>2011-01-19T03:16:06-00:00</td><td>19, Jan 2011</td>
    

    So I don’t think there is a problem with the templates for the EXSLT functions I took from http://www.exslt.org/, it looks more like a Xalan bug if you don’t get the correct output with some version of Xalan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like the following code:: <xsl:variable name=sample> <xsl:copy-of select=//foo> <xsl:copy-of select=//bar> </xsl>
Thanks to this post I've come up with the following template:- <xsl:variable name=Doc> <xsl:call-template
I have used the following code in my XSL: <xsl:variable name=link select=normalize-space(concat('#',$chapter2))/> <a href={$link}>Next
I have the following code <xsl:result-document href=output1/output3/index.html format=html> <html> <head> <SCRIPT LANGUAGE=JavaScript> function getParams()
Following XLST code works fine :- <?xml version=1.0?> <xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0> <xsl:template match=/> <xsl:for-each
Following code is generated by a for loop. <form action=saveresponse.php method=POST name=mainForm> <input class=cbox_yes
So I have the following code: <redirect:write select=concat('..\\folder\\,string(filename),'.xml')> Where filename is a tag in
I have the following code that applies a XSLT style Test.Xml.xslTransform = function(xml, xsl)
I have the following XML structure: <method constructor=true name=Main public=true> <parameterList/> <block> <call> <callAttrbute>
Currently I am using the following xslt code: <xsl:if test=position() = 3> <div> <object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.