2007-05-05 16:34:57 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:output method="html" encoding="utf-8" indent="yes"
|
|
|
|
doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
|
|
doctype-system="http://www.w3.org/TR/REC-html40/loose.dtd"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- The top level element of the input file is "buildinfo" -->
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:template match="buildinfo">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- The actual HTML tree is in "buildinfo/document" -->
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:template match="buildinfo/document">
|
|
|
|
<xsl:element name="html">
|
|
|
|
<xsl:attribute name="lang">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/@language"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:attribute>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:element>
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- HTML head -->
|
|
|
|
<xsl:template match="head">
|
|
|
|
<xsl:copy>
|
|
|
|
<meta name="robots" content="index, follow"/>
|
2007-05-06 17:58:07 +00:00
|
|
|
<link rel="stylesheet" media="all" href="/fsfeurope.css" type="text/css"/>
|
2007-05-14 19:15:13 +00:00
|
|
|
<link rel="stylesheet" media="print" href="/print.css" type="text/css"/>
|
2007-05-06 16:17:23 +00:00
|
|
|
<link rel="icon" href="/graphics/fsfeurope.ico" type="image/x-icon"/>
|
|
|
|
<link rel="shortcut icon" href="/graphics/fsfeurope.ico" type="image/x-icon"/>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- HTML body -->
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:template match="body">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:copy>
|
|
|
|
|
|
|
|
<!-- First of all, a comment to make clear this is generated -->
|
|
|
|
<xsl:comment>This file was generated by an XSLT script. Please do not edit.</xsl:comment>
|
|
|
|
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">page</xsl:attribute>
|
2007-05-06 16:37:38 +00:00
|
|
|
<xsl:comment>Unnecessary div, for IE only</xsl:comment>
|
2007-05-05 16:34:57 +00:00
|
|
|
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="class">n</xsl:attribute>
|
|
|
|
<xsl:attribute name="id">top</xsl:attribute>
|
|
|
|
<xsl:attribute name="href">#content</xsl:attribute>
|
2007-05-06 16:17:23 +00:00
|
|
|
<xsl:text>Skip menu</xsl:text>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
2007-05-06 16:37:38 +00:00
|
|
|
<xsl:comment>Give non-graphical browsers a way to skip the menu</xsl:comment>
|
2007-05-05 16:34:57 +00:00
|
|
|
|
|
|
|
<!-- Menu bar -->
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">menu</xsl:attribute>
|
|
|
|
|
|
|
|
<!-- Logo -->
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">logo</xsl:attribute>
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="class">gl</xsl:attribute>
|
|
|
|
<xsl:attribute name="href">/</xsl:attribute>
|
2007-05-06 16:17:23 +00:00
|
|
|
<xsl:element name="img">
|
|
|
|
<xsl:attribute name="alt">[FSFE Logo]</xsl:attribute>
|
|
|
|
<xsl:attribute name="src">/graphics/logo.png</xsl:attribute>
|
|
|
|
</xsl:element>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<xsl:element name="ul">
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:for-each select="/buildinfo/menuset/menu[not(@parent)]">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:sort select="@id"/>
|
|
|
|
<xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:element name="a">
|
2007-05-05 17:16:32 +00:00
|
|
|
<xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id=$id]"/>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:for-each select="/buildinfo/menuset/menu[@parent=$id]">
|
|
|
|
<xsl:sort select="@id" />
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:variable name="mid"><xsl:value-of select="@id"/></xsl:variable>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a">
|
2007-05-05 20:05:48 +00:00
|
|
|
<xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id=$mid]"/>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:for-each>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
<!-- Focus list -->
|
|
|
|
<xsl:element name="ul">
|
|
|
|
<xsl:variable name="filename"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:variable>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.fsfeurope.org<xsl:value-of select="$filename"/></xsl:attribute>Our global work</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.germany.fsfeurope.org<xsl:value-of select="$filename"/></xsl:attribute>Germany</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.italy.fsfeurope.org<xsl:value-of select="$filename"/></xsl:attribute>Italy</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.spain.fsfeurope.org<xsl:value-of select="$filename"/></xsl:attribute>Spain</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.sweden.fsfeurope.org<xsl:value-of select="$filename"/></xsl:attribute>Sweden</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
<!-- Sister organisation list -->
|
|
|
|
<xsl:element name="ul">
|
|
|
|
<xsl:element name="li">Our sister organisations</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.fsf.org</xsl:attribute>FSF</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.fsf.org.in</xsl:attribute>FSF India</xsl:element>
|
2007-05-05 17:04:36 +00:00
|
|
|
</xsl:element>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:attribute name="class">submenu</xsl:attribute>
|
2007-05-20 10:05:53 +00:00
|
|
|
<xsl:element name="a"><xsl:attribute name="href">http://www.fsfla.org</xsl:attribute>FSF Latin America</xsl:element>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
</xsl:element>
|
|
|
|
<!-- End Menu bar -->
|
|
|
|
|
|
|
|
<!-- Language bar -->
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">language</xsl:attribute>
|
|
|
|
|
2007-06-22 21:29:39 +00:00
|
|
|
<!-- Join the Fellowship -->
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="href">https://www.fsfe.org/join</xsl:attribute>
|
|
|
|
<xsl:element name="img">
|
|
|
|
<xsl:attribute name="alt">Join the Fellowship!</xsl:attribute>
|
|
|
|
<xsl:attribute name="src">/graphics/global/Join_Fellowship.png</xsl:attribute>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:element>
|
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Translation list -->
|
|
|
|
<xsl:element name="ul">
|
|
|
|
<xsl:for-each select="/buildinfo/trlist/tr">
|
|
|
|
<xsl:sort select="@id"/>
|
|
|
|
<xsl:element name="li">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@id=/buildinfo/@language">
|
|
|
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="href"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
|
|
|
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
<!-- Outdated note -->
|
|
|
|
<xsl:if test="/buildinfo/@outdated='yes'">
|
|
|
|
<xsl:element name="p">
|
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='outdated']/node()" />
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<!-- Missing translation note -->
|
|
|
|
<xsl:if test="/buildinfo/@language!=/buildinfo/document/@language">
|
|
|
|
<xsl:element name="p">
|
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='notranslation']/node()" />
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
</xsl:element>
|
|
|
|
<!-- End Language bar -->
|
|
|
|
|
|
|
|
<!-- Content -->
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">content</xsl:attribute>
|
2007-05-06 17:15:52 +00:00
|
|
|
<xsl:attribute name="id">content</xsl:attribute>
|
2007-05-06 16:25:47 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Here goes the actual content of the <body> node of the input file -->
|
|
|
|
<xsl:apply-templates select="node()"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Link to top -->
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="class">n</xsl:attribute>
|
|
|
|
<xsl:attribute name="href">#top</xsl:attribute>
|
2007-05-06 16:25:47 +00:00
|
|
|
<xsl:text>To top</xsl:text>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
</xsl:element>
|
|
|
|
<!-- End Content -->
|
|
|
|
|
|
|
|
<!-- Footer -->
|
|
|
|
<xsl:element name="div">
|
|
|
|
<xsl:attribute name="class">footer</xsl:attribute>
|
|
|
|
|
|
|
|
<xsl:element name="p">
|
|
|
|
|
|
|
|
<!-- Copyright -->
|
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='copyright']/node()"/>
|
|
|
|
|
|
|
|
<!-- "Last changed" magic -->
|
|
|
|
<xsl:variable name="timestamp">
|
|
|
|
<xsl:value-of select="/buildinfo/document/timestamp"/>
|
|
|
|
</xsl:variable>
|
|
|
|
<!-- FIXME: over time, all pages should have the timestamp -->
|
|
|
|
<!-- tags, so this conditional could be removed -->
|
|
|
|
<xsl:if test="string-length($timestamp) > 0">
|
|
|
|
<xsl:variable name="Date">
|
|
|
|
<xsl:value-of select="substring-before(substring-after($timestamp, 'Date: '), ' $')"/>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="Author">
|
|
|
|
<xsl:value-of select="substring-before(substring-after($timestamp, 'Author: '), ' $')"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:variable>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='lastchanged']/node()"/>
|
|
|
|
<xsl:value-of select="translate ($Date, '/', '-')"/>
|
|
|
|
(<xsl:value-of select="$Author"/>)
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<!-- Link to the XHTML source -->
|
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:text>/source</xsl:text>
|
|
|
|
<xsl:value-of select="/buildinfo/@filename"/>
|
|
|
|
<xsl:text>.</xsl:text>
|
|
|
|
<xsl:value-of select="/buildinfo/document/@language"/>
|
|
|
|
<xsl:text>.xhtml</xsl:text>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:text>[XHTML]</xsl:text>
|
|
|
|
</xsl:element>
|
|
|
|
|
2007-09-13 19:03:23 +00:00
|
|
|
<!-- Insert the appropriate translation notice -->
|
|
|
|
<xsl:if test="/buildinfo/document/@translation!=''">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:element name="br"/>
|
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id='translator1']"/>
|
|
|
|
<xsl:value-of select="/buildinfo/document/translator"/>
|
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id='translator2']"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:element name="a">
|
|
|
|
<xsl:attribute name="href">
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/@filename"/>
|
|
|
|
<xsl:text>.en.html</xsl:text>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:attribute>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id='translator3']"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:element>
|
2007-05-05 16:34:57 +00:00
|
|
|
<xsl:value-of select="/buildinfo/textset/text[@id='translator4']"/>
|
|
|
|
</xsl:if>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Permission note -->
|
|
|
|
<xsl:element name="br"/>
|
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='permission']/node()"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Webmaster feedback note -->
|
|
|
|
<xsl:element name="br"/>
|
2007-05-05 16:56:24 +00:00
|
|
|
<xsl:apply-templates select="/buildinfo/textset/text[@id='webmaster']/node()"/>
|
2007-05-05 16:34:57 +00:00
|
|
|
</xsl:element>
|
|
|
|
|
|
|
|
</xsl:element>
|
|
|
|
<!-- End Footer -->
|
|
|
|
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:copy>
|
2007-03-03 14:52:27 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- Do not copy non-HTML elements to output -->
|
|
|
|
<xsl:template match="timestamp|translator|buildinfo/set|buildinfo/textset|buildinfo/menuset|buildinfo/trlist"/>
|
2007-03-03 14:52:27 +00:00
|
|
|
|
2007-05-05 16:34:57 +00:00
|
|
|
<!-- For all other nodes, copy verbatim -->
|
2007-03-03 14:52:27 +00:00
|
|
|
<xsl:template match="@*|node()" priority="-1">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|