source: documentation/trunk/manuals/processing/xml-to-top-index.xsl@ 17494

Last change on this file since 17494 was 17494, checked in by anna, 16 years ago

Updated tutorials and associated files.

  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE TutorialList [
3 <!ENTITY nbsp "&#160;">
4 <!ENTITY rarr "&#8594;">
5 <!ENTITY mdash "&#8212;">
6]>
7
8<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
9 <xsl:output method="html"/>
10 <xsl:include href="common.xsl"/>
11
12 <xsl:variable name="es">Español</xsl:variable>
13 <xsl:variable name="fr">Français</xsl:variable>
14 <xsl:variable name="ru">РусскОй</xsl:variable>
15 <xsl:variable name="ar">عرؚي</xsl:variable>
16
17 <xsl:variable name="sourceforgelink">http://prdownloads.sourceforge.net/greenstone</xsl:variable>
18 <xsl:variable name="manual-suffix">-1</xsl:variable>
19
20 <xsl:variable name="tab">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:variable>
21 <xsl:template match="Manifest">
22 <html>
23 <head><title>Greenstone Manuals</title></head>
24 <link rel="stylesheet" href="style.css" type="text/css"/>
25 <body>
26 <h1>Greenstone Manuals</h1>
27 <xsl:for-each select="Manual">
28 <!-- language name in the first row-->
29 <h3>
30 <a class="title" href="en/html/{@id}_en_index.html"><xsl:apply-templates select="@name"/></a>
31 <xsl:text> </xsl:text><a class="title" href="es/html/{@id}_es_index.html"><xsl:value-of select="$es"/></a>
32 <xsl:text> </xsl:text><a class="title" href="fr/html/{@id}_fr_index.html"><xsl:value-of select="$fr"/></a>
33 <xsl:text> </xsl:text><a class="title" href="ru/html/{@id}_ru_index.html"><xsl:value-of select="$ru"/></a>
34 <xsl:if test="@id='Install'"><xsl:text> </xsl:text><a class="title" href="ar/html/{@id}_ar_index.html"><xsl:value-of select="$ar"/></a></xsl:if>
35 </h3>
36
37 <div class="note"><xsl:value-of select="note"/></div>
38
39 <div class="comment">Printable version:
40 English (<a class="comment" href="en/html/{@id}_en_all.html">HTML</a><xsl:text> </xsl:text><a class="comment" href="{$sourceforgelink}/{@id}-en{$manual-suffix}.pdf">PDF</a>)
41 <xsl:value-of select="$tab"/><xsl:value-of select="$es"/> (<a class="comment" href="es/html/{@id}_es_all.html">HTML</a><xsl:text> </xsl:text><a class="comment" href="{$sourceforgelink}/{@id}-es{$manual-suffix}.pdf">PDF</a>)
42 <xsl:value-of select="$tab"/><xsl:value-of select="$fr"/> (<a class="comment" href="fr/html/{@id}_fr_all.html">HTML</a><xsl:text> </xsl:text><a class="comment" href="{$sourceforgelink}/{@id}-fr{$manual-suffix}.pdf">PDF</a>)
43 <xsl:value-of select="$tab"/><xsl:value-of select="$ru"/> (<a class="comment" href="ru/html/{@id}_ru_all.html">HTML</a><xsl:text> </xsl:text><a class="comment" href="{$sourceforgelink}/{@id}-ru{$manual-suffix}.pdf">PDF</a>)
44 <xsl:if test="@id='Install'"><xsl:value-of select="$tab"/><xsl:value-of select="$ar"/> (<a class="comment" href="ar/html/{@id}_ar_all.html">HTML</a><xsl:text> </xsl:text><a class="comment" href="{$sourceforgelink}/{@id}-ar{$manual-suffix}.pdf">PDF</a>)</xsl:if>
45 </div>
46
47 <dl><xsl:apply-templates select="file"><xsl:with-param name="manualNodes" select="document(file/@href)"/></xsl:apply-templates></dl>
48 </xsl:for-each>
49
50 <hr/>
51 <div style="text-align:center;">
52 <xsl:apply-templates select="Manual[1]/file" mode="copyright">
53 <xsl:with-param name="manualNodes" select="document(Manual[1]/file/@href)"/>
54 </xsl:apply-templates>
55 </div>
56 </body>
57</html>
58</xsl:template>
59
60<xsl:template match="file">
61<xsl:param name="manualNodes"/>
62<dt><xsl:apply-templates select="$manualNodes//Chapter"/></dt>
63</xsl:template>
64
65<xsl:template match="file" mode="copyright">
66<xsl:param name="manualNodes"/>
67<xsl:apply-templates select="$manualNodes/Manual/Section[@id='copyright']/Content"/>
68</xsl:template>
69
70<xsl:template match="Chapter">
71 <dd>
72 <a href="en/html/Chapter_{@id}.htm"><xsl:apply-templates select="Title/Text"/></a>
73 <xsl:text> </xsl:text>[<a href="es/html/Chapter_{@id}.htm"><xsl:value-of select="$es"/></a>
74 <xsl:text> </xsl:text><a href="fr/html/Chapter_{@id}.htm"><xsl:value-of select="$fr"/></a>
75 <xsl:text> </xsl:text><a href="ru/html/Chapter_{@id}.htm"><xsl:value-of select="$ru"/></a>
76 <xsl:if test="//@id='Install'"><xsl:text> </xsl:text><a href="ar/html/Chapter_{@id}.htm"><xsl:value-of select="$ar"/></a></xsl:if>]</dd>
77</xsl:template>
78</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.