[Clfs-commits] [Cross-LFS]Cross-LFS Book branch, simp, updated. 7b0cc7e8015d7adf0bd0b59249d1666cdc807b86

git git at cross-lfs.org
Sun Mar 6 20:08:28 PST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cross-LFS Book".

The branch, simp has been updated
       via  7b0cc7e8015d7adf0bd0b59249d1666cdc807b86 (commit)
      from  33cb2bd96a75c78ccae9fc620e3988c08c41aa8b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7b0cc7e8015d7adf0bd0b59249d1666cdc807b86
Author: Joe Ciccone <jciccone at gmail.com>
Date:   Sun Mar 6 22:26:52 2011 -0500

    Automatically generate the indexterm element from the title. This will
    need to be changed in the future because a real package will have a
    version number attached to the title.

diff --git a/BOOK/stylesheets/clfs-profile.xsl b/BOOK/stylesheets/clfs-profile.xsl
index 014dada..4a8bf8c 100644
--- a/BOOK/stylesheets/clfs-profile.xsl
+++ b/BOOK/stylesheets/clfs-profile.xsl
@@ -86,26 +86,50 @@
           <xsl:text>.html"</xsl:text>
         </xsl:processing-instruction>
 
+        <xsl:variable name="titlesuffix">
+          <xsl:if test="contains($clfs.multilib, ',') and ($multibuild = 'true')">
+            <xsl:choose>
+              <xsl:when test="$bits = '32'">
+                <xsl:text>32Bit</xsl:text>
+              </xsl:when>
+              <xsl:when test="$bits = 'n32'">
+                <xsl:text>N32</xsl:text>
+              </xsl:when>
+              <xsl:when test="$bits = '64'">
+                <xsl:text>64Bit</xsl:text>
+              </xsl:when>
+            </xsl:choose>
+          </xsl:if>
+        </xsl:variable>
+
         <xsl:for-each select="title">
           <xsl:element name="title">
             <xsl:copy-of select="@*|node()" />
-            <xsl:if test="contains($clfs.multilib, ',') and ($multibuild = 'true')">
+            <xsl:if test="string-length($titlesuffix) > 0">
               <xsl:text> - </xsl:text>
-              <xsl:choose>
-                <xsl:when test="$bits = '32'">
-                  <xsl:text>32Bit</xsl:text>
-                </xsl:when>
-                <xsl:when test="$bits = 'n32'">
-                  <xsl:text>N32</xsl:text>
-                </xsl:when>
-                <xsl:when test="$bits = '64'">
-                  <xsl:text>64Bit</xsl:text>
-                </xsl:when>
-              </xsl:choose>
+              <xsl:value-of select="$titlesuffix"/>
             </xsl:if>
           </xsl:element>
         </xsl:for-each>
 
+        <xsl:element name="indexterm">
+          <xsl:attribute name="zone">
+            <xsl:value-of select="concat($id, $idsuffix)" />
+          </xsl:attribute>
+          <xsl:element name="primary">
+            <xsl:attribute name="sortas">
+              <xsl:text>a-</xsl:text>
+              <xsl:value-of select="title" />
+            </xsl:attribute>
+            <xsl:value-of select="title" />
+          </xsl:element>
+          <xsl:if test="string-length($titlesuffix) > 0">
+            <xsl:element name="secondary">
+              <xsl:value-of select="$titlesuffix" />
+            </xsl:element>
+          </xsl:if>
+        </xsl:element>
+
         <xsl:choose>
           <xsl:when test="$bits = '32'">
             <xsl:apply-templates select="@*|node()[not(self::title)]" mode="filter-bits-32" />

-----------------------------------------------------------------------

Summary of changes:
 BOOK/stylesheets/clfs-profile.xsl |   48 +++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Cross-LFS Book



More information about the Clfs-commits mailing list