logo       

CVS: boost/tools/boostbook/xsl html.xsl, 1.22.6.2, 1.22.6.3: msg#00801

Subject: CVS: boost/tools/boostbook/xsl html.xsl, 1.22.6.2, 1.22.6.3
Update of /cvsroot/boost/boost/tools/boostbook/xsl
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14762

Modified Files:
      Tag: RC_1_34_0
        html.xsl 
Log Message:
Format Subversion revisions, too. From Julio M Merino Vidal

Index: html.xsl
===================================================================
RCS file: /cvsroot/boost/boost/tools/boostbook/xsl/html.xsl,v
retrieving revision 1.22.6.2
retrieving revision 1.22.6.3
diff -u -d -r1.22.6.2 -r1.22.6.3
--- html.xsl    4 Apr 2006 22:58:56 -0000       1.22.6.2
+++ html.xsl    29 Sep 2006 15:10:19 -0000      1.22.6.3
@@ -104,6 +104,59 @@
                                  $time, ' GMT')"/>
   </xsl:template>
 
+
+  <xsl:template name="format.svn.revision">
+    <xsl:param name="text"/>
+
+    <!-- Remove the "$Date: " -->
+    <xsl:variable name="text.noprefix" 
+      select="substring-after($text, '$Date: ')"/>
+
+    <!-- Grab the year -->
+    <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
+    <xsl:variable name="text.noyear" 
+      select="substring-after($text.noprefix, '-')"/>
+
+    <!-- Grab the month -->
+    <xsl:variable name="month" select="substring-before($text.noyear, '-')"/>
+    <xsl:variable name="text.nomonth" 
+      select="substring-after($text.noyear, '-')"/>
+
+    <!-- Grab the year -->
+    <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
+    <xsl:variable name="text.noday" 
+      select="substring-after($text.nomonth, ' ')"/>
+
+    <!-- Get the time -->
+    <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
+    <xsl:variable name="text.notime" 
+      select="substring-after($text.noday, ' ')"/>
+
+    <!-- Get the timezone -->
+    <xsl:variable name="timezone" select="substring-before($text.notime, ' 
')"/>
+
+    <xsl:variable name="month.name">
+      <xsl:choose>
+        <xsl:when test="$month=1">January</xsl:when>
+        <xsl:when test="$month=2">February</xsl:when>
+        <xsl:when test="$month=3">March</xsl:when>
+        <xsl:when test="$month=4">April</xsl:when>
+        <xsl:when test="$month=5">May</xsl:when>
+        <xsl:when test="$month=6">June</xsl:when>
+        <xsl:when test="$month=7">July</xsl:when>
+        <xsl:when test="$month=8">August</xsl:when>
+        <xsl:when test="$month=9">September</xsl:when>
+        <xsl:when test="$month=10">October</xsl:when>
+        <xsl:when test="$month=11">November</xsl:when>
+        <xsl:when test="$month=12">December</xsl:when>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
+                                 $time, ' ', $timezone)"/>
+  </xsl:template>
+
+
   <xsl:template match="copyright" mode="boost.footer">
     <xsl:if test="position() &gt; 1">
       <br/>
@@ -144,9 +197,18 @@
               <small>
                 <p>
                   <xsl:text>Last revised: </xsl:text>
-                  <xsl:call-template name="format.cvs.revision">
-                    <xsl:with-param name="text" select="$revision-text"/>
-                  </xsl:call-template>
+                  <xsl:choose>
+                    <xsl:when test="contains($revision-text, '/')">
+                      <xsl:call-template name="format.cvs.revision">
+                        <xsl:with-param name="text" select="$revision-text"/>
+                      </xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:call-template name="format.svn.revision">
+                        <xsl:with-param name="text" select="$revision-text"/>
+                      </xsl:call-template>
+                    </xsl:otherwise>
+                  </xsl:choose>
                 </p>
               </small>
             </xsl:if>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe