Changeset 8165

Show
Ignore:
Timestamp:
06/14/07 14:07:24 (1 year ago)
Author:
manuel
Message:

Cleaned XHTML output code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/new-xsl/lfs.css

    r8151 r8165  
    3535} 
    3636 
    37 div.dedication .titlepage { 
    38   background: #fff; 
    39 
    40  
    41 div.dedication p { 
    42   padding-left: 2em; 
     37div.dedication { 
     38  padding-left: 1em; 
    4339} 
    4440 
     
    159155} 
    160156 
    161 div.headertitles h4 { 
     157div.navheader h4 { 
    162158  margin-top: .4em; 
    163159  margin-bottom: 0; 
     
    165161} 
    166162 
    167 div.headertitles h3 { 
     163div.navheader h3 { 
    168164  margin-top: .2em; 
    169165  margin-bottom: 0; 
     
    265261} 
    266262 
     263.indexref { 
     264    display: block; 
     265} 
     266 
    267267.item + .indexref { 
    268268    margin-left: 31em; 
     
    275275 
    276276/* Admonitions */ 
     277div.admon img { 
     278  padding: .3em; 
     279} 
     280 
     281div.admon h3 { 
     282  display: inline; 
     283  margin-left: 2em; 
     284} 
     285 
     286div.admon p { 
     287  margin-left: .5em; 
     288} 
     289 
     290div.admon pre { 
     291  margin: 0.5em 3em; 
     292} 
     293 
    277294div.note, div.tip { 
    278295  background-color: #fffff6; 
     
    294311} 
    295312 
    296 div.admonhead img { 
    297   padding: .3em; 
    298 } 
    299  
    300 div.admonhead h3 { 
    301   display: inline; 
    302   margin-left: 1.5em; 
    303 } 
    304  
    305 div.admonbody { 
    306   margin: .5em; 
    307 } 
    308  
    309313div.important em, div.warning em, div.caution em { 
    310314  color: #000; 
     
    330334} 
    331335 
    332 div.revhistory { 
     336.revhistory { 
    333337  padding-left: 1em; 
    334338} 
    335339 
    336 div.revhistory th { 
     340.revhistory th { 
    337341  line-height: 2em; 
    338342  text-align: left; 
    339343} 
    340344 
    341 div.revhistory td { 
     345.revhistory td { 
    342346  padding-right: 1em; 
    343347} 
  • branches/new-xsl/xhtml/lfs-admon.xsl

    r8027 r8165  
    3939      </xsl:call-template> 
    4040    </xsl:variable> 
    41     <div class="{name(.)}"> 
    42       <div class ="admonhead"> 
    43         <img alt="[{$alt}]"> 
    44           <xsl:attribute name="src"> 
    45             <xsl:call-template name="admon.graphic"/> 
    46           </xsl:attribute> 
    47         </img> 
    48         <h3 class="admontitle"> 
    49           <xsl:apply-templates select="." mode="object.title.markup"/> 
    50         </h3> 
    51       </div> 
    52       <div class="admonbody"> 
    53         <xsl:apply-templates/> 
    54       </div> 
     41    <div class="admon {name(.)}"> 
     42      <img alt="[{$alt}]"> 
     43        <xsl:attribute name="src"> 
     44          <xsl:call-template name="admon.graphic"/> 
     45        </xsl:attribute> 
     46      </img> 
     47      <h3> 
     48        <xsl:apply-templates select="." mode="object.title.markup"/> 
     49      </h3> 
     50      <xsl:apply-templates/> 
    5551    </div> 
    5652  </xsl:template> 
  • branches/new-xsl/xhtml/lfs-index.xsl

    r8139 r8165  
    3535    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    3636  <xsl:template name="index.titlepage"> 
    37     <div class="titlepage"> 
    38       <h1 class="index"> 
    39         <xsl:call-template name="gentext"> 
    40           <xsl:with-param name="key" select="$index-title"/> 
    41         </xsl:call-template> 
    42       </h1> 
    43     </div> 
     37    <h1 class="index"> 
     38      <xsl:call-template name="gentext"> 
     39        <xsl:with-param name="key" select="$index-title"/> 
     40      </xsl:call-template> 
     41    </h1> 
    4442  </xsl:template> 
    4543 
     
    5654      <!-- Make sure that we don't generate a div if there are no terms in scope --> 
    5755    <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> 
    58       <div class="indexdiv"> 
    59         <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> 
    60           <h2> 
    61             <xsl:choose> 
    62               <xsl:when test="$divtitle = 'A'"> 
    63                 <a id="package-index" name="package-index"/> 
     56      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> 
     57        <h2> 
     58          <xsl:choose> 
     59            <xsl:when test="$divtitle = 'A'"> 
     60              <a id="package-index" name="package-index"/> 
     61              <xsl:call-template name="gentext"> 
     62                <xsl:with-param name="key">Packages</xsl:with-param> 
     63              </xsl:call-template> 
     64            </xsl:when> 
     65            <xsl:when test="$divtitle = 'B'"> 
     66              <a id="program-index" name="program-index"/> 
     67              <xsl:call-template name="gentext"> 
     68                <xsl:with-param name="key">Programs</xsl:with-param> 
     69              </xsl:call-template> 
     70            </xsl:when> 
     71            <xsl:when test="$divtitle = 'C'"> 
     72              <a id="library-index" name="library-index"/> 
     73              <xsl:call-template name="gentext"> 
     74                <xsl:with-param name="key">Libraries</xsl:with-param> 
     75              </xsl:call-template> 
     76            </xsl:when> 
     77            <xsl:when test="$divtitle = 'D'"> 
     78              <xsl:choose> 
     79                <xsl:when test="$book-type = 'blfs'"> 
     80                  <a id="kernel-config-index" name="kernel-config-index"/> 
     81                  <xsl:call-template name="gentext"> 
     82                    <xsl:with-param name="key">Kernel Configuration</xsl:with-param> 
     83                  </xsl:call-template> 
     84                </xsl:when> 
     85                <xsl:otherwise> 
     86                  <a id="scripts-index" name="scripts-index"/> 
     87                  <xsl:call-template name="gentext"> 
     88                    <xsl:with-param name="key">Scripts</xsl:with-param> 
     89                  </xsl:call-template> 
     90                </xsl:otherwise> 
     91              </xsl:choose> 
     92            </xsl:when> 
     93            <xsl:when test="$divtitle = 'E'"> 
     94              <xsl:choose> 
     95                <xsl:when test="$book-type = 'blfs'"> 
     96                  <a id="config-file-index" name="config-file-index"/> 
     97                  <xsl:call-template name="gentext"> 
     98                    <xsl:with-param name="key">Configuration Files</xsl:with-param> 
     99                  </xsl:call-template> 
     100                </xsl:when> 
     101                <xsl:otherwise> 
     102                  <a id="other-index" name="other-index"/> 
     103                  <xsl:call-template name="gentext"> 
     104                    <xsl:with-param name="key">Others</xsl:with-param> 
     105                  </xsl:call-template> 
     106                </xsl:otherwise> 
     107              </xsl:choose> 
     108            </xsl:when> 
     109            <xsl:when test="$divtitle = 'F'"> 
     110                <a id="bootscript-index" name="bootscript-index"/> 
    64111                <xsl:call-template name="gentext"> 
    65                   <xsl:with-param name="key">Packages</xsl:with-param> 
     112                  <xsl:with-param name="key">Bootscripts</xsl:with-param> 
    66113                </xsl:call-template> 
    67               </xsl:when> 
    68               <xsl:when test="$divtitle = 'B'"> 
    69                 <a id="program-index" name="program-index"/> 
    70                 <xsl:call-template name="gentext"> 
    71                   <xsl:with-param name="key">Programs</xsl:with-param> 
    72                 </xsl:call-template> 
    73               </xsl:when> 
    74               <xsl:when test="$divtitle = 'C'"> 
    75                 <a id="library-index" name="library-index"/> 
    76                 <xsl:call-template name="gentext"> 
    77                   <xsl:with-param name="key">Libraries</xsl:with-param> 
    78                 </xsl:call-template> 
    79               </xsl:when> 
    80               <xsl:when test="$divtitle = 'D'"> 
    81                 <xsl:choose> 
    82                   <xsl:when test="$book-type = 'blfs'"> 
    83                     <a id="kernel-config-index" name="kernel-config-index"/> 
    84                     <xsl:call-template name="gentext"> 
    85                       <xsl:with-param name="key">Kernel Configuration</xsl:with-param> 
    86                     </xsl:call-template> 
    87                   </xsl:when> 
    88                   <xsl:otherwise> 
    89                     <a id="scripts-index" name="scripts-index"/> 
    90                     <xsl:call-template name="gentext"> 
    91                       <xsl:with-param name="key">Scripts</xsl:with-param> 
    92                     </xsl:call-template> 
    93                   </xsl:otherwise> 
    94                 </xsl:choose> 
    95               </xsl:when> 
    96               <xsl:when test="$divtitle = 'E'"> 
    97                 <xsl:choose> 
    98                   <xsl:when test="$book-type = 'blfs'"> 
    99                     <a id="config-file-index" name="config-file-index"/> 
    100                     <xsl:call-template name="gentext"> 
    101                       <xsl:with-param name="key">Configuration Files</xsl:with-param> 
    102                     </xsl:call-template> 
    103                   </xsl:when> 
    104                   <xsl:otherwise> 
    105                     <a id="other-index" name="other-index"/> 
    106                     <xsl:call-template name="gentext"> 
    107                       <xsl:with-param name="key">Others</xsl:with-param> 
    108                     </xsl:call-template> 
    109                   </xsl:otherwise> 
    110                 </xsl:choose> 
    111               </xsl:when> 
    112               <xsl:when test="$divtitle = 'F'"> 
    113                   <a id="bootscript-index" name="bootscript-index"/> 
    114                   <xsl:call-template name="gentext"> 
    115                     <xsl:with-param name="key">Bootscripts</xsl:with-param> 
    116                   </xsl:call-template> 
    117               </xsl:when> 
    118               <xsl:when test="$divtitle = 'G'"> 
    119                 <a id="other-index" name="other-index"/> 
    120                 <xsl:call-template name="gentext"> 
    121                   <xsl:with-param name="key">Others</xsl:with-param> 
    122                 </xsl:call-template> 
    123               </xsl:when> 
    124               <xsl:otherwise> 
    125                 <xsl:value-of select="$divtitle"/> 
    126               </xsl:otherwise> 
    127             </xsl:choose> 
    128           </h2> 
    129         </xsl:if> 
    130         <ul> 
    131           <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]" 
    132                                mode="index-primary"> 
    133             <xsl:with-param name="scope" select="$scope"/> 
    134             <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 
    135           </xsl:apply-templates> 
    136         </ul> 
    137       </div> 
     114            </xsl:when> 
     115            <xsl:when test="$divtitle = 'G'"> 
     116              <a id="other-index" name="other-index"/> 
     117              <xsl:call-template name="gentext"> 
     118                <xsl:with-param name="key">Others</xsl:with-param> 
     119              </xsl:call-template> 
     120            </xsl:when> 
     121            <xsl:otherwise> 
     122              <xsl:value-of select="$divtitle"/> 
     123            </xsl:otherwise> 
     124          </xsl:choose> 
     125        </h2> 
     126      </xsl:if> 
     127      <ul> 
     128        <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]" 
     129                              mode="index-primary"> 
     130          <xsl:with-param name="scope" select="$scope"/> 
     131          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 
     132        </xsl:apply-templates> 
     133      </ul> 
    138134    </xsl:if> 
    139135  </xsl:template> 
     
    167163        <xsl:text>: </xsl:text> 
    168164      </strong> 
    169       <div class='indexref'> 
     165      <span class='indexref'> 
    170166        <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',concat($key, &sep;, &section.id;))[&scope;][1])]"> 
    171167          <xsl:apply-templates select="." mode="reference"> 
     
    173169          </xsl:apply-templates> 
    174170        </xsl:for-each> 
    175       </div
     171      </span
    176172      <xsl:if test="$refs/secondary"> 
    177173        <ul> 
     
    201197        <xsl:text>: </xsl:text> 
    202198      </strong> 
    203       <div class='indexref'> 
     199      <span class='indexref'> 
    204200        <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, &section.id;))[&scope;][1])]"> 
    205201          <xsl:apply-templates select="." mode="reference"> 
     
    207203          </xsl:apply-templates> 
    208204        </xsl:for-each> 
    209       </div
     205      </span
    210206    </li> 
    211207  </xsl:template> 
  • branches/new-xsl/xhtml/lfs-mixed.xsl

    r8139 r8165  
    245245    </xsl:variable> 
    246246    <xsl:variable name="contents"> 
    247       <div class="{name(.)}"> 
    248         <table summary="{$title}"> 
    249           <tr> 
    250             <th colspan="{$numcols}"> 
    251               <b> 
    252                 <xsl:value-of select="$title"/> 
    253               </b> 
    254             </th> 
    255           </tr> 
    256           <xsl:apply-templates mode="titlepage.mode"> 
    257             <xsl:with-param name="numcols" select="$numcols"/> 
    258           </xsl:apply-templates> 
    259         </table> 
    260       </div> 
     247      <table summary="{$title}" class="{name(.)}"> 
     248        <tr> 
     249          <th colspan="{$numcols}"> 
     250            <b> 
     251              <xsl:value-of select="$title"/> 
     252            </b> 
     253          </th> 
     254        </tr> 
     255        <xsl:apply-templates mode="titlepage.mode"> 
     256          <xsl:with-param name="numcols" select="$numcols"/> 
     257        </xsl:apply-templates> 
     258      </table> 
    261259    </xsl:variable> 
    262260    <xsl:copy-of select="$contents"/> 
  • branches/new-xsl/xhtml/lfs-navigational.xsl

    r8162 r8165  
    3030    <xsl:if test="$home != ."> 
    3131      <div class="navheader"> 
    32           <!-- Add common titles --> 
    33         <div class="headertitles"> 
    34            <!-- Book title and version --> 
    35           <h4> 
    36             <xsl:apply-templates select="$home" mode="object.title.markup"/> 
    37             <xsl:text> - </xsl:text> 
    38             <xsl:apply-templates select="$home" mode="object.subtitle.markup"/> 
    39           </h4> 
    40             <!-- Except for preface, part, and index, add the title of the parent --> 
    41           <xsl:if test="$up != $home"> 
    42             <h3> 
    43               <xsl:apply-templates select="$up" mode="object.title.markup"/> 
    44             </h3> 
    45           </xsl:if> 
    46         </div> 
     32          <!-- Book title and version --> 
     33        <h4> 
     34          <xsl:apply-templates select="$home" mode="object.title.markup"/> 
     35          <xsl:text> - </xsl:text> 
     36          <xsl:apply-templates select="$home" mode="object.subtitle.markup"/> 
     37        </h4> 
     38          <!-- Except for preface, part, and index, add the title of the parent --> 
     39        <xsl:if test="$up != $home"> 
     40          <h3> 
     41            <xsl:apply-templates select="$up" mode="object.title.markup"/> 
     42          </h3> 
     43        </xsl:if> 
    4744          <!-- Create header navigational links --> 
    4845        <xsl:call-template name="navigational.links"> 
  • branches/new-xsl/xhtml/lfs-titles.xsl

    r8162 r8165  
    1212    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    1313  <xsl:template name="preface.titlepage"> 
    14     <div class="titlepage"> 
     14    <h1 class="{name(.)}"> 
    1515      <xsl:if test="@id"> 
    1616        <a id="{@id}" name="{@id}"/> 
    1717      </xsl:if> 
    18       <h1 class="{name(.)}"> 
    19         <xsl:value-of select="title"/> 
    20       </h1> 
    21     </div> 
     18      <xsl:value-of select="title"/> 
     19    </h1> 
    2220  </xsl:template> 
    2321 
     
    2826    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    2927  <xsl:template name="part.titlepage"> 
    30     <div class="titlepage"> 
     28    <h1 class="{name(.)}"> 
    3129      <xsl:if test="@id"> 
    3230        <a id="{@id}" name="{@id}"/> 
    3331      </xsl:if> 
    34       <h1 class="{name(.)}"> 
    35         <xsl:if test="$section.autolabel != 0"> 
    36           <xsl:apply-templates select="." mode="label.markup"/> 
    37           <xsl:text>. </xsl:text> 
    38         </xsl:if> 
    39         <xsl:value-of select="title"/> 
    40       </h1> 
    41     </div> 
     32      <xsl:if test="$section.autolabel != 0"> 
     33        <xsl:apply-templates select="." mode="label.markup"/> 
     34        <xsl:text>. </xsl:text> 
     35      </xsl:if> 
     36      <xsl:value-of select="title"/> 
     37    </h1> 
    4238  </xsl:template> 
    4339 
     
    4743  <xsl:template name="partintro.titlepage"> 
    4844    <xsl:if test="title"> 
    49       <div class="partintrotitle"> 
     45      <h2 class="{name(.)}"> 
    5046        <xsl:if test="@id"> 
    5147          <a id="{@id}" name="{@id}"/> 
    5248        </xsl:if> 
    53         <h2 class="{name(.)}"> 
    54           <xsl:value-of select="title"/> 
    55         </h2> 
    56       </div> 
     49        <xsl:value-of select="title"/> 
     50      </h2> 
    5751    </xsl:if> 
    5852  </xsl:template> 
     
    6458    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    6559  <xsl:template name="appendix.titlepage"> 
    66     <div class="titlepage"> 
     60    <h1 class="{name(.)}"> 
    6761      <xsl:if test="@id"> 
    6862        <a id="{@id}" name="{@id}"/> 
    6963      </xsl:if> 
    70       <h1 class="{name(.)}"> 
    71         <xsl:if test="$section.autolabel != 0"> 
    72           <xsl:apply-templates select="." mode="label.markup"/> 
    73           <xsl:text>. </xsl:text> 
    74         </xsl:if> 
    75         <xsl:value-of select="title"/> 
    76       </h1> 
    77     </div> 
     64      <xsl:if test="$section.autolabel != 0"> 
     65        <xsl:apply-templates select="." mode="label.markup"/> 
     66        <xsl:text>. </xsl:text> 
     67      </xsl:if> 
     68      <xsl:value-of select="title"/> 
     69    </h1> 
    7870  </xsl:template> 
    7971 
     
    8476    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    8577  <xsl:template name="chapter.titlepage"> 
    86     <div class="titlepage"> 
     78    <h1 class="{name(.)}"> 
    8779      <xsl:if test="@id"> 
    8880        <a id="{@id}" name="{@id}"/> 
    8981      </xsl:if> 
    90       <h1 class="{name(.)}"> 
    91         <xsl:if test="$section.autolabel != 0"> 
    92           <xsl:apply-templates select="." mode="label.markup"/> 
    93           <xsl:text>. </xsl:text> 
    94         </xsl:if> 
    95         <xsl:value-of select="title"/> 
    96       </h1> 
    97     </div> 
     82      <xsl:if test="$section.autolabel != 0"> 
     83        <xsl:apply-templates select="." mode="label.markup"/> 
     84        <xsl:text>. </xsl:text> 
     85      </xsl:if> 
     86      <xsl:value-of select="title"/> 
     87    </h1> 
    9888  </xsl:template> 
    9989 
     
    10292    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    10393  <xsl:template name="sect1.titlepage"> 
    104     <div class="titlepage"> 
     94    <h1 class="{name(.)}"> 
    10595      <xsl:if test="@id"> 
    10696        <a id="{@id}" name="{@id}"/> 
    10797      </xsl:if> 
    108       <h1 class="{name(.)}"> 
    109         <xsl:if test="$section.autolabel != 0"> 
    110           <xsl:apply-templates select="." mode="label.markup"/> 
    111           <xsl:text>. </xsl:text> 
    112         </xsl:if> 
    113         <xsl:value-of select="title"/> 
    114       </h1> 
    115     </div> 
     98      <xsl:if test="$section.autolabel != 0"> 
     99        <xsl:apply-templates select="." mode="label.markup"/> 
     100        <xsl:text>. </xsl:text> 
     101      </xsl:if> 
     102      <xsl:value-of select="title"/> 
     103    </h1> 
    116104  </xsl:template> 
    117105 
     
    125113      <xsl:when test="string-length(title) = 0"/> 
    126114      <xsl:otherwise> 
    127         <div class="titlepage"> 
     115        <h2 class="{name(.)}"> 
    128116          <xsl:if test="@id"> 
    129117            <a id="{@id}" name="{@id}"/> 
    130118          </xsl:if> 
    131           <h2 class="{name(.)}"> 
    132             <xsl:if test="not(ancestor::preface) and $section.autolabel != 0"> 
    133               <xsl:apply-templates select="." mode="label.markup"/> 
    134               <xsl:text>. </xsl:text> 
    135             </xsl:if> 
    136             <xsl:value-of select="title"/> 
    137           </h2> 
    138         </div> 
     119          <xsl:if test="not(ancestor::preface) and $section.autolabel != 0"> 
     120            <xsl:apply-templates select="." mode="label.markup"/> 
     121            <xsl:text>. </xsl:text> 
     122          </xsl:if> 
     123          <xsl:value-of select="title"/> 
     124        </h2> 
    139125      </xsl:otherwise> 
    140126    </xsl:choose> 
     
    145131    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    146132  <xsl:template name="sect3.titlepage"> 
    147     <div class="titlepage"> 
     133    <h3 class="{name(.)}"> 
    148134      <xsl:if test="@id"> 
    149135        <a id="{@id}" name="{@id}"/> 
    150136      </xsl:if> 
    151       <h3 class="{name(.)}"> 
    152         <xsl:if test="$section.autolabel != 0"> 
    153           <xsl:apply-templates select="." mode="label.markup"/> 
    154           <xsl:text>. </xsl:text> 
    155         </xsl:if> 
    156         <xsl:value-of select="title"/> 
    157       </h3> 
    158     </div> 
     137      <xsl:if test="$section.autolabel != 0"> 
     138        <xsl:apply-templates select="." mode="label.markup"/> 
     139        <xsl:text>. </xsl:text> 
     140      </xsl:if> 
     141      <xsl:value-of select="title"/> 
     142    </h3> 
    159143  </xsl:template> 
    160144 
     
    163147    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> 
    164148  <xsl:template name="dedication.titlepage"> 
    165     <div class="titlepage"> 
    166       <h2 class="{name(.)}"> 
    167         <xsl:value-of select="title"/> 
    168       </h2> 
    169     </div> 
     149    <h2> 
     150      <xsl:value-of select="title"/> 
     151    </h2> 
    170152  </xsl:template> 
    171153