Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 22:16:17 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-projects@freebsd.org
Subject:   svn commit: r42359 - projects/db5/share/xsl
Message-ID:  <201307212216.r6LMGHJ5013713@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Sun Jul 21 22:16:16 2013
New Revision: 42359
URL: http://svnweb.freebsd.org/changeset/doc/42359

Log:
  - Render blue links by default.
  - Add support for a single variable that indicated whether we are building
    for screen or for print.  In the latter case, blue links are disabled
    and the URI of links is included in a footnote.

Modified:
  projects/db5/share/xsl/freebsd-fo.xsl

Modified: projects/db5/share/xsl/freebsd-fo.xsl
==============================================================================
--- projects/db5/share/xsl/freebsd-fo.xsl	Sun Jul 21 22:14:53 2013	(r42358)
+++ projects/db5/share/xsl/freebsd-fo.xsl	Sun Jul 21 22:16:16 2013	(r42359)
@@ -17,6 +17,15 @@
   <!-- Include customized FO titlepage -->
   <xsl:import href="freebsd-fo-titlepage.xsl"/>
 
+  <xsl:param name="print">0</xsl:param>
+
+  <xsl:variable name="link.color">
+    <xsl:choose>
+      <xsl:when test="$print = 1">black</xsl:when>
+      <xsl:otherwise>blue</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
   <!--
 	FO-SPECIFIC PARAMETER SETTINGS
   -->
@@ -92,6 +101,16 @@
   <xsl:param name="body.font.master">9.5</xsl:param>
   <xsl:param name="monospace.font.family">DejaVu Sans Mono</xsl:param>
 
+  <!-- Linking -->
+  <xsl:param name="ulink.show" select="$print"/>
+  <xsl:param name="ulink.footnotes" select="$print"/>
+  <xsl:param name="email.mailto.enabled">
+    <xsl:choose>
+      <xsl:when test="$print = 1">0</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:param>
+
   <!-- Property sets -->
   <xsl:attribute-set name="chapter.title.properties">
   <xsl:attribute name="font-size">24pt</xsl:attribute>
@@ -234,6 +253,12 @@
   <xsl:attribute name="padding-bottom">0.5cm</xsl:attribute>
   </xsl:attribute-set>
 
+  <xsl:attribute-set name="xref.properties">
+    <xsl:attribute name="color">
+      <xsl:value-of select="$link.color"/>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
   <!--
 	FO-SPECIFIC TEMPLATE CUSTOMIZATIONS
   -->
@@ -332,7 +357,7 @@
     </xsl:variable>
 
     <fo:basic-link external-destination="url({$xhref})">
-      <fo:inline color="blue">
+      <fo:inline color="{$link.color}">
 	<xsl:value-of select="concat(db:refentrytitle, '(', db:manvolnum, ')')"/>
       </fo:inline>
     </fo:basic-link>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307212216.r6LMGHJ5013713>