This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] dbtimestamp PI function
- From: "Lars Bjerges" <lars dot bjerges at foreningssparbanken dot se>
- To: <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 17 Sep 2004 15:39:26 +0200
- Subject: [docbook-apps] 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älsningar
Lars Bjerges
Team Verktyg
TTFöreningsSparbanken IT
105 34 Stockholm
11+46 (0)8 58 59 43 45
55+46 (0)70 95 27 774