Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 64052
Collapse All | Expand All

(-)./doc/en/inserts-en.xml (+2 lines)
Lines 13-16 Link Here
13
  <insert name="PrintableDoc">Printable Linux Documentation</insert>
13
  <insert name="PrintableDoc">Printable Linux Documentation</insert>
14
  <insert name="PrintablePrj">Printable Linux Project</insert>
14
  <insert name="PrintablePrj">Printable Linux Project</insert>
15
  <insert name="SpaceBeforeColon"/>
15
  <insert name="SpaceBeforeColon"/>
16
  <insert name="Print">Print</insert>
17
  <insert name="PrintTip">View a printer-friendly version</insert>
16
</inserts>
18
</inserts>
(-)./xsl/handbook.xsl (-25 / +5 lines)
Lines 15-28 Link Here
15
      <xsl:apply-templates select="part" />
15
      <xsl:apply-templates select="part" />
16
    </xsl:when>
16
    </xsl:when>
17
    <xsl:otherwise>
17
    <xsl:otherwise>
18
      <xsl:choose>
18
      <xsl:call-template name="doclayout"/>
19
        <xsl:when test="$style = 'printable'">
20
          <xsl:call-template name="printdoclayout" />
21
        </xsl:when>
22
        <xsl:otherwise>
23
          <xsl:call-template name="doclayout"/>
24
        </xsl:otherwise>
25
      </xsl:choose>
26
    </xsl:otherwise>
19
    </xsl:otherwise>
27
  </xsl:choose>
20
  </xsl:choose>
28
</xsl:template>
21
</xsl:template>
Lines 91-104 Link Here
91
    </xsl:apply-templates>
84
    </xsl:apply-templates>
92
  </xsl:if>
85
  </xsl:if>
93
  <xsl:if test="($chap = 0) and ($part = position())">
86
  <xsl:if test="($chap = 0) and ($part = position())">
94
    <xsl:choose>
87
    <xsl:call-template name="doclayout" />
95
      <xsl:when test="$style = 'printable'">
96
        <xsl:call-template name="printdoclayout" />
97
      </xsl:when>
98
      <xsl:otherwise>
99
        <xsl:call-template name="doclayout" />
100
      </xsl:otherwise>
101
    </xsl:choose>
102
  </xsl:if>
88
  </xsl:if>
103
</xsl:template>
89
</xsl:template>
104
90
Lines 160-167 Link Here
160
      </xsl:choose>
146
      </xsl:choose>
161
      <!-- Content -->
147
      <!-- Content -->
162
      [ <a href="{/book/@link}?part=0&amp;chap=0">Home</a> ]
148
      [ <a href="{/book/@link}?part=0&amp;chap=0">Home</a> ]
163
      <!-- Printable -->
149
      <!-- Printable
164
      [ <a href="{/book/@link}?part={$part}&amp;chap={$chap}&amp;style=printable">Print</a> ]
150
      [ <a href="{/book/@link}?part={$part}&amp;chap={$chap}&amp;style=printable">Print</a> ]
151
      -->
165
      <!-- Next Chapter -->
152
      <!-- Next Chapter -->
166
      <xsl:if test="name() = 'book'">
153
      <xsl:if test="name() = 'book'">
167
        [ <a href="{/book/@link}?part=1">&gt;</a> ]
154
        [ <a href="{/book/@link}?part=1">&gt;</a> ]
Lines 212-225 Link Here
212
<!-- Chapter inside a part -->
199
<!-- Chapter inside a part -->
213
<xsl:template match="/book/part/chapter">
200
<xsl:template match="/book/part/chapter">
214
  <xsl:if test="($chap = position()) and ($full = 0)">
201
  <xsl:if test="($chap = position()) and ($full = 0)">
215
    <xsl:choose>
202
    <xsl:call-template name="doclayout" />
216
      <xsl:when test="$style = 'printable'">
217
        <xsl:call-template name="printdoclayout" />
218
      </xsl:when>
219
      <xsl:otherwise>
220
        <xsl:call-template name="doclayout" />
221
      </xsl:otherwise>
222
    </xsl:choose>
223
  </xsl:if>
203
  </xsl:if>
224
  <xsl:if test="$full = 1">
204
  <xsl:if test="$full = 1">
225
    <xsl:call-template name="bookpartchaptercontent">
205
    <xsl:call-template name="bookpartchaptercontent">
(-)./xsl/guide-print.xsl (-26 / +2 lines)
Lines 4-37 Link Here
4
4
5
<xsl:include href="guide.xsl" />
5
<xsl:include href="guide.xsl" />
6
6
7
<!-- Printable style for /guide -->
7
<!-- This file can be deleted once the AxKit config has been updated -->
8
<xsl:template name="printdoclayout">
9
<html>
10
<head>
11
  <link title="new" rel="stylesheet" href="/css/main.css" type="text/css"/>
12
  <title>
13
    <xsl:choose>
14
      <xsl:when test="/guide/@type='project'"><xsl:value-of select="xsl:gettext('PrintablePrj')"/></xsl:when>
15
      <xsl:otherwise><xsl:value-of select="xsl:gettext('PrintableDoc')"/></xsl:otherwise>
16
    </xsl:choose>
17
    -- 
18
    <xsl:choose>
19
      <xsl:when test="subtitle"><xsl:value-of select="title"/>: <xsl:value-of select="subtitle"/></xsl:when>
20
      <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
21
    </xsl:choose>
22
  </title>
23
</head>
24
<body bgcolor="#ffffff">
25
26
<!-- Content goes here -->
27
<xsl:call-template name="content" />
28
29
</body>
30
</html>
31
</xsl:template>
32
8
33
<xsl:template match="/guide">
9
<xsl:template match="/guide">
34
  <xsl:call-template name="printdoclayout" />
10
  <xsl:call-template name="doclayout" />
35
</xsl:template>
11
</xsl:template>
36
12
37
</xsl:stylesheet>
13
</xsl:stylesheet>
(-)./xsl/guide.xsl (-4 / +33 lines)
Lines 20-32 Link Here
20
20
21
<!-- Content of /guide -->
21
<!-- Content of /guide -->
22
<xsl:template name="guidecontent">
22
<xsl:template name="guidecontent">
23
  <br/>
23
  <br />
24
  <p class="dochead">
24
  <h1>
25
    <xsl:choose>
25
    <xsl:choose>
26
      <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
26
      <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
27
      <xsl:otherwise><xsl:value-of select="/guide/title"/></xsl:otherwise>
27
      <xsl:otherwise><xsl:value-of select="/guide/title"/></xsl:otherwise>
28
    </xsl:choose>
28
    </xsl:choose>
29
  </p>
29
  </h1>
30
30
31
  <xsl:choose>
31
  <xsl:choose>
32
    <xsl:when test="$style = 'printable'">
32
    <xsl:when test="$style = 'printable'">
Lines 70-78 Link Here
70
    <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
70
    <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
71
  </xsl:choose>
71
  </xsl:choose>
72
</title>
72
</title>
73
73
</head>
74
</head>
75
<xsl:choose>
76
  <xsl:when test="$style = 'printable'">
77
    <!-- Insert the node-specific content -->
78
<body bgcolor="#ffffff">
79
    <xsl:call-template name="content"/>
80
</body>
81
  </xsl:when>
82
  <xsl:otherwise>
74
<body style="margin:0px;" bgcolor="#ffffff">
83
<body style="margin:0px;" bgcolor="#ffffff">
75
76
<table width="100%" border="0" cellspacing="0" cellpadding="0">
84
<table width="100%" border="0" cellspacing="0" cellpadding="0">
77
  <tr>
85
  <tr>
78
    <td valign="top" height="125" bgcolor="#45347b">
86
    <td valign="top" height="125" bgcolor="#45347b">
Lines 100-105 Link Here
100
          </td>
108
          </td>
101
          <td width="1%" bgcolor="#dddaec" valign="top">
109
          <td width="1%" bgcolor="#dddaec" valign="top">
102
            <table border="0" cellspacing="5" cellpadding="0">
110
            <table border="0" cellspacing="5" cellpadding="0">
111
              <!-- Add a "printer-friendly" button when link attribute exists -->
112
              <xsl:if test="/book/@link or /guide/@link">
113
               <tr>
114
                <td class="altmenu" align="center">
115
                  <xsl:variable name="PrintTip"><xsl:value-of select="xsl:gettext('PrintTip')"/></xsl:variable>
116
                  <xsl:if test="/book">
117
                   <xsl:if test="$full=1">
118
                    <a title="{$PrintTip}" class="altlink" href="{/book/@link}?full=1&amp;style=printable"><xsl:value-of select="xsl:gettext('Print')"/></a>
119
                   </xsl:if>
120
                   <xsl:if test="$full=0">
121
                    <a title="{$PrintTip}" class="altlink" href="{/book/@link}?part={$part}&amp;chap={$chap}&amp;style=printable"><xsl:value-of select="xsl:gettext('Print')"/></a>
122
                   </xsl:if>
123
                  </xsl:if>
124
                  <xsl:if test="/guide">
125
                    <a title="{$PrintTip}" class="altlink" href="{/guide/@link}?style=printable"><xsl:value-of select="xsl:gettext('Print')"/></a>
126
                  </xsl:if>
127
                </td>
128
               </tr>
129
              </xsl:if>
103
              <tr>
130
              <tr>
104
                <td>
131
                <td>
105
                  <img src="/images/line.gif" alt="line"/>
132
                  <img src="/images/line.gif" alt="line"/>
Lines 241-246 Link Here
241
</table>
268
</table>
242
269
243
</body>
270
</body>
271
  </xsl:otherwise>
272
  </xsl:choose>
244
</html>
273
</html>
245
</xsl:template>
274
</xsl:template>
246
275
(-)./dtd/book.dtd (-1 / +1 lines)
Lines 80-86 Link Here
80
<!ENTITY shy    "&#x00AD;"> <!-- SOFT HYPHEN -->
80
<!ENTITY shy    "&#x00AD;"> <!-- SOFT HYPHEN -->
81
81
82
<!ELEMENT book                  (title, author+, abstract, license?, version, date, part+)>
82
<!ELEMENT book                  (title, author+, abstract, license?, version, date, part+)>
83
<!ATTLIST book                  link CDATA #IMPLIED
83
<!ATTLIST book                  link CDATA #REQUIRED
84
                                lang CDATA #IMPLIED>
84
                                lang CDATA #IMPLIED>
85
<!ELEMENT title                 (#PCDATA)>
85
<!ELEMENT title                 (#PCDATA)>
86
<!ELEMENT author                (#PCDATA|mail)*>
86
<!ELEMENT author                (#PCDATA|mail)*>
(-)./dtd/guide.dtd (-1 / +1 lines)
Lines 84-90 Link Here
84
          id          (news|about|contract|packages|graphics|articles|docs|changelog|projects|irc|lists|performace|shots|sponsors|where|newsletter|support) #IMPLIED
84
          id          (news|about|contract|packages|graphics|articles|docs|changelog|projects|irc|lists|performace|shots|sponsors|where|newsletter|support) #IMPLIED
85
          lang         CDATA #IMPLIED>
85
          lang         CDATA #IMPLIED>
86
<!ELEMENT guide                 (title, subtitle?, author+, abstract, summary?, license?, glsaindex?, version, date, newsitems?, chapter+)>
86
<!ELEMENT guide                 (title, subtitle?, author+, abstract, summary?, license?, glsaindex?, version, date, newsitems?, chapter+)>
87
<!ATTLIST guide                 link CDATA #IMPLIED
87
<!ATTLIST guide                 link CDATA #REQUIRED
88
                                type CDATA #IMPLIED
88
                                type CDATA #IMPLIED
89
                                lang CDATA #IMPLIED>
89
                                lang CDATA #IMPLIED>
90
<!ELEMENT news                  (poster, date, title, body)>
90
<!ELEMENT news                  (poster, date, title, body)>

Return to bug 64052