]> granicus.if.org Git - docbook-dsssl/commitdiff
Changed to handling of the metadata (author name and files list)
authorMichael Smith <xmldoc@users.sourceforge.net>
Wed, 27 Jun 2007 19:54:37 +0000 (19:54 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Wed, 27 Jun 2007 19:54:37 +0000 (19:54 +0000)
associated with each commit.

releasetools/svnlog2docbook.xsl

index 840523670bc022b4ed70925039ad29c18e0b025a..53a71abd2727916e5b83d7b83ec3083a442a3411 100644 (file)
         <!-- * get the filename(s) + revision(s) and username, and -->
         <!-- * put it into an Alt element, which will become a Title -->
         <!-- * element in HTML output, generating "tooltip text"-->
-        <literallayout><phrase role="commit-message">
+        <para>
+          <literal>
+          <xsl:variable name="commitmetadata">
+          <xsl:apply-templates select="author"/>
+          <xsl:text>: </xsl:text>
+            <!-- * Only get path names for files that are in the subsection -->
+            <!-- * that we are currently formatting -->
+            <xsl:for-each select="
+              paths/path[
+              starts-with(.,concat('/trunk/',$distro,'/',$dirname,'/'))
+              or starts-with(.,concat('/trunk/',$dirname,'/'))]
+              ">
+              <xsl:call-template name="string.subst">
+                <xsl:with-param name="string" select="."/>
+                <xsl:with-param name="target" select="concat('/trunk/',$distro,'/',$dirname,'/')"/>
+                <xsl:with-param name="replacement" select="''"/>
+              </xsl:call-template>
+              <xsl:if test="not(position() = last())">
+                <xsl:text>; </xsl:text>
+              </xsl:if>
+            </xsl:for-each>
+          </xsl:variable>
+          <xsl:choose>
+            <xsl:when test="string-length($commitmetadata) > 90">
+              <xsl:value-of select="substring($commitmetadata,1,90)"/>
+              <xsl:text>⋯</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="$commitmetadata"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </literal>
+        </para>
+        <screen><phrase role="commit-message">
             <xsl:apply-templates select="msg"/>
-            <alt>
-              <!-- * Only get path names for files that are in the subsection -->
-              <!-- * that we are currently formatting -->
-              <xsl:for-each select="
-                paths/path[
-                starts-with(.,concat('/trunk/',$distro,'/',$dirname,'/'))
-                or starts-with(.,concat('/trunk/',$dirname,'/'))]
-                ">
-                <xsl:apply-templates select="."/>
-                <xsl:if test="not(position() = last())">
-                  <xsl:text>; </xsl:text>
-                </xsl:if>
-              </xsl:for-each>
-              <xsl:text> - </xsl:text>
-              <xsl:apply-templates select="author"/>
-            </alt>
-          </phrase></literallayout>
+        </phrase></screen>
         <xsl:text>&#xa;</xsl:text>
       </listitem>
       <xsl:text>&#xa;</xsl:text>
     <parameter><xsl:value-of select="$word" /></parameter>
   </xsl:template>
 
-  <xsl:template match="path">
-    <xsl:value-of select="@action"/>: <xsl:value-of select="."/>
-  </xsl:template>
-
   <xsl:template match="author">
     <xsl:variable name="username" select="."/>
     <!-- * based on Sourceforge cvs username, get a real name and use -->