Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 626032 | Differences between
and this patch

Collapse All | Expand All

(-)a/devbook.xsl (-7 / +49 lines)
Lines 26-51 Link Here
26
26
27
  <xsl:template match="section">
27
  <xsl:template match="section">
28
    <div class="section">
28
    <div class="section">
29
      <xsl:variable name="anchor">
29
30
      <!-- The title of this section itself. -->
31
      <xsl:variable name="section">
30
        <xsl:call-template name="convert-to-anchor">
32
        <xsl:call-template name="convert-to-anchor">
31
          <xsl:with-param name="data" select="title"/>
33
          <xsl:with-param name="data" select="title"/>
32
        </xsl:call-template>
34
        </xsl:call-template>
33
      </xsl:variable>
35
      </xsl:variable>
34
36
35
      <h2 id="{$anchor}"><xsl:apply-templates select="title"/></h2>
37
      <h2 id="{$section}">
38
	<xsl:apply-templates select="title"/>
39
      </h2>
36
      <xsl:apply-templates select="(body|subsection)"/>
40
      <xsl:apply-templates select="(body|subsection)"/>
37
    </div>
41
    </div>
38
  </xsl:template>
42
  </xsl:template>
39
43
40
  <xsl:template match="subsection">
44
  <xsl:template match="subsection">
41
    <div class="section">
45
    <div class="section">
42
      <xsl:variable name="anchor">
46
47
      <!-- The "anchor-formatted" title of the section that contain
48
           this subsubsection. -->
49
50
      <xsl:variable name="section">
51
        <xsl:call-template name="convert-to-anchor">
52
          <xsl:with-param name="data"
53
			  select="ancestor::section[last()]/title" />
54
        </xsl:call-template>
55
      </xsl:variable>
56
57
      <!-- The title of this subsection itself. -->
58
      <xsl:variable name="subsection">
43
        <xsl:call-template name="convert-to-anchor">
59
        <xsl:call-template name="convert-to-anchor">
44
          <xsl:with-param name="data" select="title"/>
60
          <xsl:with-param name="data" select="title"/>
45
        </xsl:call-template>
61
        </xsl:call-template>
46
      </xsl:variable>
62
      </xsl:variable>
47
63
48
      <h3 id="{$anchor}"><xsl:apply-templates select="title"/></h3>
64
      <!-- Include the "current" section name in the ID to prevent
65
           collisions when two subsections have the same title (bug
66
           626032). -->
67
      <h3 id="{concat($section,'--',$subsection)}">
68
	<xsl:apply-templates select="title"/>
69
      </h3>
49
      <xsl:apply-templates select="(body|subsubsection)"/>
70
      <xsl:apply-templates select="(body|subsubsection)"/>
50
71
51
      <!-- If you need, change here to add more nesting levels -->
72
      <!-- If you need, change here to add more nesting levels -->
Lines 54-66 Link Here
54
75
55
  <xsl:template match="subsubsection">
76
  <xsl:template match="subsubsection">
56
    <div class="section">
77
    <div class="section">
57
      <xsl:variable name="anchor">
78
      <!-- The "anchor-formatted" title of the section and subsection
79
           that contain this subsubsection. -->
80
      <xsl:variable name="section">
81
        <xsl:call-template name="convert-to-anchor">
82
          <xsl:with-param name="data"
83
			  select="ancestor::section[last()]/title" />
84
        </xsl:call-template>
85
      </xsl:variable>
86
87
      <xsl:variable name="subsection">
88
        <xsl:call-template name="convert-to-anchor">
89
          <xsl:with-param name="data"
90
			  select="ancestor::subsection[last()]/title" />
91
        </xsl:call-template>
92
      </xsl:variable>
93
94
      <!-- The title of this subsubsection itself. -->
95
      <xsl:variable name="subsubsection">
58
        <xsl:call-template name="convert-to-anchor">
96
        <xsl:call-template name="convert-to-anchor">
59
          <xsl:with-param name="data" select="title"/>
97
          <xsl:with-param name="data" select="title"/>
60
        </xsl:call-template>
98
        </xsl:call-template>
61
      </xsl:variable>
99
      </xsl:variable>
62
100
63
      <h4 id="{$anchor}"><xsl:apply-templates select="title"/></h4>
101
      <!-- Include the "current" section, and subsection names in the
102
           ID to prevent collisions when two subsubsections have the
103
           same title (bug 626032). -->
104
      <h4 id="{concat($section,'--',$subsection,'--',$subsubsection)}">
105
	<xsl:apply-templates select="title"/>
106
      </h4>
64
      <xsl:apply-templates select="(body)"/>
107
      <xsl:apply-templates select="(body)"/>
65
108
66
      <!-- If you need, change here to add more nesting levels -->
109
      <!-- If you need, change here to add more nesting levels -->
67
- 

Return to bug 626032