This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Re: Current date?
- From: "W. Borgert" <debacle at debian dot org>
- To: Norman Walsh <ndw at nwalsh dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 1 Mar 2004 11:21:31 +0100
- Subject: Re: [docbook-apps] Re: Current date?
- References: <F57Ti3swBMrvgezXTFl00003772@hotmail.com> <87brzmps0h.fsf@nwalsh.com> <87el4guept.fsf@doohan.bang.priv.no> <873c8u2835.fsf@nwalsh.com>
Hi,
you can easily set the date in DocBook/XML:
my.xsl contains:
<xsl:param name="mydocdate"/>
and:
<xsl:template match="/article/title">
<xsl:copy>
<xsl:apply-templates select="title|@*|text()"/>
</xsl:copy>
<xsl:if test="string-length($mydocdate) > 0">
<simpara><xsl:copy-of select="$mydocdate"/></simpara>
</xsl:if>
</xsl:template>
Of course, you might add the date in another place than
an article title.
Transformation via Makefile into another DocBook/XML:
xsltproc --stringparam mydocdate "`date -I`" \
my.xsl my.dbk > new.dbk
Cheers, WB
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.