html.xsl
branchstyles
changeset 24 acf70691eb31
parent 21 ce4faf661fca
equal deleted inserted replaced
23:8445a48b1679 24:acf70691eb31
    57       <link href="{$css-base-dir}{$stylesheet}" media="screen" rel="stylesheet" type="text/css"/>
    57       <link href="{$css-base-dir}{$stylesheet}" media="screen" rel="stylesheet" type="text/css"/>
    58     </head>
    58     </head>
    59     <body class="book">
    59     <body class="book">
    60       <xsl:apply-templates select="docinfo/date"/>
    60       <xsl:apply-templates select="docinfo/date"/>
    61       <xsl:apply-templates/>
    61       <xsl:apply-templates/>
       
    62       <p><strong>Table des Matières</strong></p>
    62       <ul>
    63       <ul>
    63 	<xsl:apply-templates mode="book-toc" select="section|story|poetry"/>
    64 	    <xsl:apply-templates mode="book-toc" select="section|story|poetry"/>
    64       </ul>
    65       </ul>
    65       <hr/>
    66       <hr/>
    66       <address>
    67       <address>
    67         <xsl:apply-templates select="docinfo/copyright"/>
    68         <xsl:apply-templates select="docinfo/copyright"/>
    68 	<p>Aussi disponible au format <a href="{$pdf-filename}">PDF</a>.</p>
    69 	<p>Aussi disponible au format <a href="{$pdf-filename}">PDF</a>.</p>
   303 
   304 
   304 <xsl:template match="section" mode="navbar-name">
   305 <xsl:template match="section" mode="navbar-name">
   305   <xsl:value-of select="title/text()"/>
   306   <xsl:value-of select="title/text()"/>
   306 </xsl:template>
   307 </xsl:template>
   307 
   308 
   308 <xsl:template match="section|story|poetry" mode="navbar-link">
   309 <xsl:template match="section|story|poetry" mode="href">
   309   <xsl:call-template name="get-id"/>
   310   <xsl:call-template name="get-id"/>
   310 </xsl:template>
   311 </xsl:template>
   311 
   312 
   312 <xsl:template name="navbar-link">
   313 <xsl:template name="navbar-link">
   313   <xsl:param name="prefix"></xsl:param>
   314   <xsl:param name="prefix"></xsl:param>
   314   <a>
   315   <a>
   315     <xsl:attribute name="href">
   316     <xsl:attribute name="href">
   316       <xsl:apply-templates select="." mode="navbar-link"/>
   317       <xsl:apply-templates select="." mode="href"/>
   317       <xsl:text>.html</xsl:text>
   318       <xsl:text>.html</xsl:text>
   318     </xsl:attribute>
   319     </xsl:attribute>
   319     <xsl:value-of select="$prefix"/>
   320     <xsl:value-of select="$prefix"/>
   320     <xsl:apply-templates select="." mode="navbar-name"/>
   321     <xsl:apply-templates select="." mode="navbar-name"/>
   321   </a><br/>
   322   </a><br/>
   463   <a href="{$href}.html"><xsl:value-of select="docinfo/title"/></a>
   464   <a href="{$href}.html"><xsl:value-of select="docinfo/title"/></a>
   464 </xsl:template>
   465 </xsl:template>
   465 
   466 
   466 <xsl:template match="*" mode="xref"/>
   467 <xsl:template match="*" mode="xref"/>
   467 
   468 
       
   469 <xsl:template match="link">
       
   470   <xsl:variable name="linkend" select="@linkend"/>
       
   471   <a>
       
   472     <xsl:attribute name="href">
       
   473       <xsl:apply-templates select="//*[@id=$linkend]" mode="href"/>
       
   474       <xsl:text>.html</xsl:text>
       
   475     </xsl:attribute>
       
   476     <xsl:apply-templates/>
       
   477   </a>
       
   478 </xsl:template>
       
   479 
   468 <xsl:template match="section/title"/>
   480 <xsl:template match="section/title"/>
   469 <xsl:template match="section/subtitle"/>
   481 <xsl:template match="section/subtitle"/>
   470 
   482 
   471 </xsl:stylesheet>
   483 </xsl:stylesheet>
   472 
   484