source: BLFS/libs/book.xsl@ b533b78

2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since b533b78 was d3ce173, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Created BLFS master script code.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 version="1.0">
6
7<!-- $Id$ -->
8
9 <!-- NOTE: the base dir (blfs-xml) is set to the proper dir
10 via a sed in ./blfs -->
11 <xsl:import href="../blfs-xml/stylesheets/blfs-chunked.xsl"/>
12
13 <xsl:param name="mail_server" select="sendmail"/>
14
15 <xsl:param name="xwindow" select="xorg7"/>
16
17 <!-- Template from BLFS_XML/stylesheets/xhtml/lfs-xref.xsl.-->
18 <xsl:template match="xref" name="xref">
19
20 <!-- IDs that need be remaped to the proper file -->
21 <xsl:variable name="linkend">
22 <xsl:choose>
23 <xsl:when test="@linkend = 'alsa'">
24 <xsl:text>alsa-lib</xsl:text>
25 </xsl:when>
26 <xsl:when test="@linkend = 'arts'">
27 <xsl:text>aRts</xsl:text>
28 </xsl:when>
29 <xsl:when test="@linkend = 'kde'">
30 <xsl:text>kdelibs</xsl:text>
31 </xsl:when>
32 <xsl:when test="@linkend = 'server-mail'">
33 <xsl:value-of select="$mail_server"/>
34 </xsl:when>
35 <xsl:when test="@linkend = 'x-window-system'">
36 <xsl:value-of select="$xwindow"/>
37 </xsl:when>
38 <xsl:otherwise>
39 <xsl:value-of select="@linkend"/>
40 </xsl:otherwise>
41 </xsl:choose>
42 </xsl:variable>
43
44 <xsl:variable name="targets" select="key('id',$linkend)"/>
45 <!-- -->
46
47 <xsl:variable name="target" select="$targets[1]"/>
48 <xsl:variable name="refelem" select="local-name($target)"/>
49 <xsl:variable name="role" select="@role"/>
50 <xsl:call-template name="check.id.unique">
51 <xsl:with-param name="linkend" select="$linkend"/>
52 </xsl:call-template>
53 <xsl:call-template name="anchor"/>
54 <xsl:choose>
55
56 <!-- Dead links -->
57 <xsl:when test="count($target) = 0">
58 <b>
59 <xsl:value-of select="@linkend"/>
60 </b>
61 <tt>
62 <xsl:text> (in the full book)</xsl:text>
63 </tt>
64 </xsl:when>
65 <!-- -->
66
67 <xsl:when test="$target/@xreflabel">
68 <a>
69 <xsl:attribute name="href">
70 <xsl:call-template name="href.target">
71 <xsl:with-param name="object" select="$target"/>
72 </xsl:call-template>
73 </xsl:attribute>
74 <xsl:call-template name="xref.xreflabel">
75 <xsl:with-param name="target" select="$target"/>
76 </xsl:call-template>
77 </a>
78 </xsl:when>
79 <xsl:otherwise>
80 <xsl:variable name="href">
81 <xsl:call-template name="href.target">
82 <xsl:with-param name="object" select="$target"/>
83 </xsl:call-template>
84 </xsl:variable>
85 <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
86 <a href="{$href}">
87 <xsl:if test="$target/title or $target/*/title">
88 <xsl:attribute name="title">
89 <xsl:apply-templates select="$target" mode="xref-title"/>
90 </xsl:attribute>
91 </xsl:if>
92 <xsl:apply-templates select="$target" mode="xref-to">
93 <xsl:with-param name="referrer" select="."/>
94 <xsl:with-param name="role" select="$role"/>
95 <xsl:with-param name="xrefstyle">
96 <xsl:value-of select="@xrefstyle"/>
97 </xsl:with-param>
98 </xsl:apply-templates>
99 </a>
100 <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
101 </xsl:otherwise>
102 </xsl:choose>
103 </xsl:template>
104
105</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.