r2749 - jhalfs/branches/experimental/BLFS/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Jun 2 16:00:11 PDT 2006


Author: manuel
Date: 2006-06-02 17:00:10 -0600 (Fri, 02 Jun 2006)
New Revision: 2749

Modified:
   jhalfs/branches/experimental/BLFS/libs/book.xsl
   jhalfs/branches/experimental/BLFS/libs/func_dependencies
   jhalfs/branches/experimental/BLFS/libs/func_parser
Log:
Solved wrong and dead cross-references.

Modified: jhalfs/branches/experimental/BLFS/libs/book.xsl
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/book.xsl	2006-06-02 22:53:54 UTC (rev 2748)
+++ jhalfs/branches/experimental/BLFS/libs/book.xsl	2006-06-02 23:00:10 UTC (rev 2749)
@@ -10,4 +10,92 @@
   final version and set it to the proper dir via a sed in ./blfs -->
   <xsl:import href="../blfs-xml/stylesheets/blfs-chunked.xsl"/>
 
+  <xsl:param name="mail_server" select="sendmail"/>
+
+  <xsl:param name="xwindow" select="xorg7"/>
+
+     <!-- Template from BLFS_XML/stylesheets/xhtml/lfs-xref.xsl.-->
+  <xsl:template match="xref" name="xref">
+
+    <!-- IDs that need be remaped to the proper file -->
+    <xsl:variable name="linkend">
+      <xsl:choose>
+        <xsl:when test="@linkend = 'alsa'">
+          <xsl:text>alsa-lib</xsl:text>
+        </xsl:when>
+        <xsl:when test="@linkend = 'arts'">
+          <xsl:text>aRts</xsl:text>
+        </xsl:when>
+        <xsl:when test="@linkend = 'kde'">
+          <xsl:text>kdelibs</xsl:text>
+        </xsl:when>
+        <xsl:when test="@linkend = 'server-mail'">
+          <xsl:value-of select="$mail_server"/>
+        </xsl:when>
+        <xsl:when test="@linkend = 'x-window-system'">
+          <xsl:value-of select="$xwindow"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@linkend"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:variable name="targets" select="key('id',$linkend)"/>
+    <!-- -->
+
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:variable name="refelem" select="local-name($target)"/>
+    <xsl:variable name="role" select="@role"/>
+    <xsl:call-template name="check.id.unique">
+      <xsl:with-param name="linkend" select="$linkend"/>
+    </xsl:call-template>
+    <xsl:call-template name="anchor"/>
+    <xsl:choose>
+
+      <!-- Dead links -->
+      <xsl:when test="count($target) = 0">
+        <xsl:value-of select="@linkend"/>
+        <xsl:text> (link in the full book)</xsl:text>
+      </xsl:when>
+      <!-- -->
+
+      <xsl:when test="$target/@xreflabel">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="object" select="$target"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:call-template name="xref.xreflabel">
+            <xsl:with-param name="target" select="$target"/>
+          </xsl:call-template>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
+        <a href="{$href}">
+          <xsl:if test="$target/title or $target/*/title">
+            <xsl:attribute name="title">
+              <xsl:apply-templates select="$target" mode="xref-title"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="$target" mode="xref-to">
+            <xsl:with-param name="referrer" select="."/>
+            <xsl:with-param name="role" select="$role"/>
+            <xsl:with-param name="xrefstyle">
+              <xsl:value-of select="@xrefstyle"/>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </a>
+        <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
 </xsl:stylesheet>

Modified: jhalfs/branches/experimental/BLFS/libs/func_dependencies
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/func_dependencies	2006-06-02 22:53:54 UTC (rev 2748)
+++ jhalfs/branches/experimental/BLFS/libs/func_dependencies	2006-06-02 23:00:10 UTC (rev 2749)
@@ -195,26 +195,26 @@
     # Special packages (a lot of hacks)
     case $DEP in
 
-      db ) # The proper version of DB is installed in LFS
-        continue ;;
+      db ) continue ;; # The proper version of DB is installed in LFS
 
         # Don't have their own XML file
-      hal-requirements | hal-runtime-dependencies )
-        continue ;;
+      hal-requirements | hal-runtime-dependencies ) continue ;;
+      perl-* | tk-perl )         DEP=perl-modules ;;
 
         # Orphan links (proper link must be created when generating the book)
       arts )                     DEP=aRts ;;
       kde )                      DEP=kde-core ;;
-      perl-* | tk-perl )         DEP=perl-modules ;;
+
+       # Dummy gnome-core pages
       GNOME-desktop-file-utils ) DEP=desktop-file-utils ;;
       GNOME-shared-mime-info )   DEP=shared-mime-info ;;
 
         # Set values for alternative packages
         # X is a meta-package, thus handled in another way.
-      LPRng | cups )      DEP=$PRINT_SERVER ;;
-      mitkrb | heimdal )  DEP=$KBR5 ;;
-      gs | espgs )        DEP=$GHOSTSCRIPT ;;
-      server-mail )       DEP=$MAIL_SERVER ;;
+      LPRng | cups )             DEP=$PRINT_SERVER ;;
+      mitkrb | heimdal )         DEP=$KBR5 ;;
+      gs | espgs )               DEP=$GHOSTSCRIPT ;;
+      server-mail )              DEP=$MAIL_SERVER ;;
     esac
 
     #------------------

Modified: jhalfs/branches/experimental/BLFS/libs/func_parser
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/func_parser	2006-06-02 22:53:54 UTC (rev 2748)
+++ jhalfs/branches/experimental/BLFS/libs/func_parser	2006-06-02 23:00:10 UTC (rev 2749)
@@ -98,7 +98,10 @@
   local filename # output filename
 
   echo -en  "\tGenerating the HTML book ..."
-  xsltproc --xinclude --nonet --stringparam base.dir HTML/ \
+  xsltproc --xinclude --nonet \
+           --stringparam mail_server $MAIL_SERVER \
+           --stringparam xwindow $X11 \
+           --stringparam base.dir HTML/ \
            ../libs/book.xsl \
            $TARGET-index.xml > xsltproc.log 2>&1
 




More information about the alfs-log mailing list