← Prev in month ← Prev in thread

dbtimestamp PI function

From
"Mars Cjerges"
Date
2004-09-17T13:40:17+00:00
ID
Thread
dbtimestamp PI function
Hi,
Here is a strange thing:
I try to use the dbtimestamp PI as:
<?dbtimestamp format="Y-m-d"?>
and as I am using Xalan (2-6-0) it should work since the date-time function is supported.

However, I get:
"file:///C:/Docbook/xsl/common/pi.xsl; Line #85; Column #20;
        Timestamp processing requires XSLT processor with EXSLT date support."

Which is the result of the following code in /common/pi/xsl:
<xsl:choose>
    <xsl:when test="function-available('date:date-time')">
      <xsl:call-template name="datetime.format">
        <xsl:with-param name="date" select="$date"/>
        <xsl:with-param name="format" select="$format"/>
        <xsl:with-param name="padding" select="$padding"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:message>
        Timestamp processing requires XSLT processor with EXSLT date support.
      </xsl:message>
    </xsl:otherwise>
  </xsl:choose>

As I have used the date-time function in a customization layer I found this very strange. What I did was add the following (in pi.xsl):
<xsl:call-template name="datetime.format">
  <xsl:with-param name="date" select="date:date-time()"/>
  <xsl:with-param name="format" select="$format"/>
</xsl:call-template>

And it comes out allright. I.e. I do not do the "function-avaliable" test but just execute the function right off.

It seems that the "function-available" does not really work here or am I missing something?
Has anybody had a similar experience?

H鄟sningar

Lars Bjerges
Team Verktyg
TTF顤eningsSparbanken IT
105 34 Stockholm
11+46 (0)8 58 59 43 45
55+46 (0)70 95 27 774
← Prev in month ← Prev in thread