This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Customizing book/bookinfo/pubdate
- From: Frans Englich <frans dot englich at telia dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 18 Aug 2004 14:19:38 +0000
- Subject: [docbook-apps] Customizing book/bookinfo/pubdate
Hello all,
I'm trying to insert the date of processing into the pubdate tag, but it
doesn't work as it should:
1. In /book/bookinfo/ I have the pubdate tag.
2. In my Makefile I have this:
xsltproc --stringparam processingDate "$(shell date '+%Y/%m')" \
The param is correctly passed into my stylesheet.
3. The template which is to insert the date, looks like this:
<xsl:template match="pubdate">
<xsl:with-param name="date" select="$processingDate"/>
<xsl:message>Match! pubdate</xsl:message>
<xsl:value-of select="$date"/>
</xsl:template>
But it doesn't hit. However, if I put the pubdate in any other arbitrary
element, such as a sect1, the template matches. I have the same problem
with /book/bookinfo/title
I guess this is caused by I don't grasp XSL correctly: A docbook template hits
pubdate, and then the node(pubdate) is not any longer available in the
document.
How do I do this customization correctly? Is there some pattern for overriding
templates/modifying documents?
Cheers,
Frans