Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85021 - trunk/tools/boostbook/xsl
From: robert.kawulak_at_[hidden]
Date: 2013-07-13 08:44:17


Author: rkawulak
Date: 2013-07-13 08:44:17 EDT (Sat, 13 Jul 2013)
New Revision: 85021
URL: http://svn.boost.org/trac/boost/changeset/85021

Log:
[BoostBook] Added support for SVN fixed-length $Date$ keyword.

Text files modified:
   trunk/tools/boostbook/xsl/html-base.xsl | 10 ++++++----
   trunk/tools/boostbook/xsl/html-help.xsl | 10 ++++++----
   2 files changed, 12 insertions(+), 8 deletions(-)

Modified: trunk/tools/boostbook/xsl/html-base.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/html-base.xsl Fri Jul 12 16:24:42 2013 (r85020)
+++ trunk/tools/boostbook/xsl/html-base.xsl 2013-07-13 08:44:17 EDT (Sat, 13 Jul 2013) (r85021)
@@ -140,9 +140,9 @@
   <xsl:template name="format.svn.revision">
     <xsl:param name="text"/>
 
- <!-- Remove the "$Date: " -->
+ <!-- Remove the "$Date: " or "$Date:: " -->
     <xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
+ select="substring-after($text, ': ')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
@@ -184,8 +184,10 @@
       </xsl:choose>
     </xsl:variable>
 
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
   </xsl:template>
 
   <!-- Footer Copyright -->

Modified: trunk/tools/boostbook/xsl/html-help.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/html-help.xsl Fri Jul 12 16:24:42 2013 (r85020)
+++ trunk/tools/boostbook/xsl/html-help.xsl 2013-07-13 08:44:17 EDT (Sat, 13 Jul 2013) (r85021)
@@ -78,9 +78,9 @@
   <xsl:template name="format.svn.revision">
     <xsl:param name="text"/>
 
- <!-- Remove the "$Date: " -->
+ <!-- Remove the "$Date: " or "$Date:: " -->
     <xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
+ select="substring-after($text, ': ')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
@@ -122,8 +122,10 @@
       </xsl:choose>
     </xsl:variable>
 
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
   </xsl:template>
 
   <!-- We don't want refentry's to show up in the TOC because they


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk