This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]