Next in thread → Next in month →

Re: [docbook-apps] Re: Current date?

From
W. Borgert <>
Date
2004-03-01T10:08:35+00:00
ID
Thread
Re: [docbook-apps] Re: Current date?
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
Next in thread → Next in month →