[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Customizing book/bookinfo/pubdate
The titlepage stuff is processed in a different mode, so that is why your template isn't getting used. Try changing the first line to: <xsl:template match="pubdate" mode="titlepage.mode"> The titlepage *info elements are processed in a different mode so they can be selected from and rearranged, rather than just processed in document order. You also need to make sure that pubdate is included in the titlepage elements for your document type, as specified in titlepage.templates.xml. It is for book and article by default. You also need to change the second line. That should be xsl:param, not xsl:with-param. I'm surprised your xslt processor didn't complain. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Frans Englich" <frans.englich@telia.com> To: <docbook-apps@lists.oasis-open.org> Sent: Wednesday, August 18, 2004 7:19 AM 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 > > > > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]