This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Current date?
- From: Stephane Bortzmeyer <bortzmeyer at nic dot fr>
- To: Rune Enggaard Lausen <rune at enggaard-lausen dot dk>
- Cc: Mailing List <mailinglist dot 01 dot 1 at goolo dot com>, Brian Burridge <brian at burridge dot net>, DocBookApps <docbook-apps at lists dot oasis-open dot org>
- Date: Thu, 3 Apr 2003 14:50:34 +0200
- Subject: Re: [docbook-apps] Current date?
- Organization: NIC France
- References: <1048863783.1339.0.camel@mi6.local> <3E8ABFF2.3090009@goolo.com> <3E8AC9BC.5090806@enggaard-lausen.dk>
On Wed, Apr 02, 2003 at 01:30:05PM +0200,
Rune Enggaard Lausen <rune at enggaard-lausen dot dk> wrote
a message of 83 lines which said:
> If you are willing to rely on EXSLT support in the XSLT processor, you
> could do like I did in our XSL-FO customization layer. It works with
> Saxon and xsltproc. Don't know about Xalan.
On my Debian 3.0 box, Xalan 1.2 does not support EXSLT. Neither do
Transformiix or Sablotron. So, I changed your stylesheet a bit to
handle non-EXSLT processors in a better way.
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
version='1.0'>
<xsl:template match="text">
<!-- Other stuff here ... -->
<xsl:text> " Produced by </xsl:text>
<xsl:value-of select="system-property('xsl:vendor')"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="system-property('xsl:vendor-url')"/>
<xsl:text>) </xsl:text>
<xsl:choose>
<xsl:when test="function-available('date:date-time')">
<xsl:text>" on </xsl:text>
<xsl:variable name="now" select="date:date-time()"/>
<xsl:value-of select="date:day-in-month($now)"/>
<xsl:text> </xsl:text>
<xsl:value-of select="date:month-name($now)"/>
<xsl:text> </xsl:text>
<xsl:value-of select="date:year($now)"/>
<xsl:text> </xsl:text>
<xsl:value-of select="date:hour-in-day($now)"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="date:minute-in-hour($now)"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="date:second-in-minute($now)"/>
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>" Current date not found, your XSL processor
" does not support EXSLT <http://exslt.org/> extensions :-( </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org