Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/ https://fsfe.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fsfe.xsl 51KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:dt="http://xsltsl.org/date-time"
  4. exclude-result-prefixes="dt"
  5. xmlns:str="http://exslt.org/strings"
  6. extension-element-prefixes="str">
  7. <xsl:import href="tools/xsltsl/translations.xsl" />
  8. <xsl:import href="tools/xsltsl/static-elements.xsl" />
  9. <!-- HTML 5 compatibility doctype, since our XSLT parser doesn't support disabling output escaping -->
  10. <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
  11. <xsl:variable name="mode">
  12. <xsl:value-of select="'normal'" /> <!-- can be either 'normal' or 'valentine' -->
  13. </xsl:variable>
  14. <!-- The top level element of the input file is "buildinfo" -->
  15. <xsl:template match="/">
  16. <xsl:apply-templates select="buildinfo/document"/>
  17. </xsl:template>
  18. <!-- The actual HTML tree is in "buildinfo/document" -->
  19. <xsl:template match="buildinfo/document">
  20. <xsl:element name="html">
  21. <xsl:attribute name="lang">
  22. <xsl:value-of select="/buildinfo/@language"/>
  23. </xsl:attribute>
  24. <xsl:if test="/buildinfo/@language='ar'">
  25. <xsl:attribute name="dir">rtl</xsl:attribute>
  26. </xsl:if>
  27. <!--<xsl:apply-templates select="node()"/>-->
  28. <xsl:apply-templates select="head" />
  29. <xsl:call-template name="fsfe-body" />
  30. </xsl:element>
  31. </xsl:template>
  32. <!-- HTML head -->
  33. <xsl:template match="head">
  34. <head>
  35. <xsl:call-template name="fsfe-head" />
  36. </head>
  37. </xsl:template>
  38. <xsl:template name="fsfe-head">
  39. <!-- Don't let search engine robots index untranslated pages -->
  40. <xsl:element name="meta">
  41. <xsl:attribute name="name">robots</xsl:attribute>
  42. <xsl:attribute name="content">
  43. <xsl:choose>
  44. <xsl:when test="/buildinfo/@language=/buildinfo/document/@language">index, follow</xsl:when>
  45. <xsl:otherwise>noindex</xsl:otherwise>
  46. </xsl:choose>
  47. </xsl:attribute>
  48. </xsl:element>
  49. <!-- For pages used on external web servers, load the CSS from absolute URL -->
  50. <xsl:variable name="urlprefix"><xsl:if test="/buildinfo/document/@external">https://fsfe.org</xsl:if></xsl:variable>
  51. <xsl:element name="link">
  52. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  53. <xsl:attribute name="media">all</xsl:attribute>
  54. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/generic.css</xsl:attribute>
  55. <xsl:attribute name="type">text/css</xsl:attribute>
  56. </xsl:element>
  57. <xsl:if test="$mode = 'valentine'">
  58. <xsl:element name="link">
  59. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  60. <xsl:attribute name="media">all</xsl:attribute>
  61. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/genericv.css</xsl:attribute>
  62. <xsl:attribute name="type">text/css</xsl:attribute>
  63. </xsl:element>
  64. </xsl:if>
  65. <xsl:element name="link">
  66. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  67. <xsl:attribute name="media">print</xsl:attribute>
  68. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/print.css</xsl:attribute>
  69. <xsl:attribute name="type">text/css</xsl:attribute>
  70. </xsl:element>
  71. <xsl:if test="/buildinfo/@language='ar'">
  72. <xsl:element name="link">
  73. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  74. <xsl:attribute name="media">all</xsl:attribute>
  75. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/rtl.css</xsl:attribute>
  76. <xsl:attribute name="type">text/css</xsl:attribute>
  77. </xsl:element>
  78. </xsl:if>
  79. <xsl:element name="link">
  80. <xsl:attribute name="rel">icon</xsl:attribute>
  81. <xsl:attribute name="href">
  82. <xsl:value-of select="$urlprefix"/>
  83. <xsl:choose>
  84. <xsl:when test="$mode = 'valentine'">/graphics/fsfev.png</xsl:when>
  85. <xsl:otherwise>/graphics/fsfe.ico</xsl:otherwise>
  86. </xsl:choose>
  87. </xsl:attribute>
  88. <xsl:attribute name="type">image/x-icon</xsl:attribute>
  89. </xsl:element>
  90. <xsl:element name="link">
  91. <xsl:attribute name="rel">alternate</xsl:attribute>
  92. <xsl:attribute name="title">FSFE <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'menu1/news'" /></xsl:call-template></xsl:attribute>
  93. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/news/news.<xsl:value-of select="/buildinfo/@language"/>.rss</xsl:attribute>
  94. <xsl:attribute name="type">application/rss+xml</xsl:attribute>
  95. </xsl:element>
  96. <xsl:element name="link">
  97. <xsl:attribute name="rel">alternate</xsl:attribute>
  98. <xsl:attribute name="title">FSFE <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'menu1/events'" /></xsl:call-template></xsl:attribute>
  99. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/events/events.<xsl:value-of select="/buildinfo/@language"/>.rss</xsl:attribute>
  100. <xsl:attribute name="type">application/rss+xml</xsl:attribute>
  101. </xsl:element>
  102. <xsl:for-each select="/buildinfo/trlist/tr">
  103. <xsl:sort select="@id"/>
  104. <xsl:element name="link">
  105. <xsl:attribute name="type">text/html</xsl:attribute>
  106. <xsl:attribute name="rel">alternate</xsl:attribute>
  107. <xsl:attribute name="hreflang"><xsl:value-of select="@id" /></xsl:attribute>
  108. <xsl:attribute name="lang"><xsl:value-of select="@id" /></xsl:attribute>
  109. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
  110. <xsl:attribute name="title"><xsl:value-of select="." disable-output-escaping="yes" /></xsl:attribute>
  111. </xsl:element>
  112. </xsl:for-each>
  113. <xsl:for-each select="/buildinfo/document/author">
  114. <xsl:variable name="id">
  115. <xsl:value-of select="@id" />
  116. </xsl:variable>
  117. <xsl:element name="meta">
  118. <xsl:attribute name="name">author</xsl:attribute>
  119. <xsl:attribute name="content">
  120. <xsl:choose>
  121. <xsl:when test="@id and document('about/people/people.en.xml')/personset/person[@id=$id]">
  122. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />
  123. </xsl:when>
  124. <xsl:otherwise>
  125. <xsl:value-of select="name" />
  126. </xsl:otherwise>
  127. </xsl:choose>
  128. </xsl:attribute>
  129. </xsl:element>
  130. </xsl:for-each>
  131. <script src="/scripts/jquery.js"></script>
  132. <script src="/scripts/master.js"></script>
  133. <script src="/scripts/placeholder.js"></script>
  134. <script src="/scripts/highlight.pack.js"></script>
  135. <script>
  136. hljs.tabReplace = " ";
  137. // hljs.initHighligtingOnLoad();
  138. // above line throws error: Uncaught TypeError: Object [object Object] has no method 'initHighligtingOnLoad'
  139. </script>
  140. <xsl:comment>
  141. <![CDATA[
  142. [if lt IE 8]>
  143. <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
  144. <![endif]
  145. ]]>
  146. </xsl:comment>
  147. <xsl:apply-templates select="@*|node()"/>
  148. </xsl:template>
  149. <!-- Modify H1 -->
  150. <xsl:template match="h1">
  151. <!-- Apply news page PRE-rules -->
  152. <xsl:if test="string(/buildinfo/document/@newsdate) and
  153. (not(string(/buildinfo/document/@type)) or
  154. /buildinfo/document/@type != 'newsletter')">
  155. <!-- add link to press/press.xx.html -->
  156. <xsl:element name="p">
  157. <xsl:attribute name="id">category</xsl:attribute>
  158. <xsl:element name="a">
  159. <xsl:attribute name="href">/press/press.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  160. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'press'" /></xsl:call-template>
  161. </xsl:element>
  162. </xsl:element>
  163. </xsl:if>
  164. <!-- Apply newsletter page PRE-rules -->
  165. <xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'newsletter'">
  166. <xsl:element name="p">
  167. <xsl:attribute name="id">category</xsl:attribute>
  168. <xsl:element name="a">
  169. <xsl:attribute name="href">/news/newsletter.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  170. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'newsletter'" /></xsl:call-template>
  171. </xsl:element>
  172. </xsl:element>
  173. </xsl:if>
  174. <!-- auto generate ID for headings if it doesn't already exist -->
  175. <xsl:call-template name="generate-id" />
  176. <!-- Apply news page rules -->
  177. <xsl:if test="string(/buildinfo/document/@newsdate) and
  178. (not(string(/buildinfo/document/@type)) or
  179. /buildinfo/document/@type != 'newsletter')">
  180. <!-- add publishing information (author, date) -->
  181. <xsl:element name="div">
  182. <xsl:attribute name="id">article-metadata</xsl:attribute>
  183. <xsl:element name="p">
  184. <span class="label"> <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>: </span><xsl:value-of select="/buildinfo/document/@newsdate" />
  185. </xsl:element>
  186. </xsl:element>
  187. </xsl:if>
  188. <!-- End apply news page rules -->
  189. <!-- Apply newsletter page -->
  190. <xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'newsletter'">
  191. <xsl:call-template name="subscribe-nl" />
  192. </xsl:if>
  193. <!-- End apply newsletter page rules -->
  194. <!-- Depreciated- see next block: Apply article rules -->
  195. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-1']/@content)">
  196. <xsl:element name="div">
  197. <xsl:attribute name="id">article-metadata</xsl:attribute>
  198. <xsl:element name="p">
  199. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-1']/@content)">
  200. <span class="label"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'author'" /></xsl:call-template>: </span>
  201. <xsl:choose>
  202. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-1']">
  203. <xsl:variable name="author-link-1" select="/buildinfo/document/head/meta[@name='author-link-1']/@content" />
  204. <a rel='author' href='{$author-link-1}'>
  205. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-1']/@content" /> </a>
  206. </xsl:when>
  207. <xsl:otherwise>
  208. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-1']/@content" />
  209. </xsl:otherwise>
  210. </xsl:choose>
  211. </xsl:if>
  212. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-2']/@content)">
  213. <xsl:choose>
  214. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-2']">
  215. <xsl:variable name="author-link-2" select="/buildinfo/document/head/meta[@name='author-link-2']/@content" />
  216. , <a rel='author' href='{$author-link-2}'>
  217. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-2']/@content" /> </a>
  218. </xsl:when>
  219. <xsl:otherwise>
  220. , <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-2']/@content" />
  221. </xsl:otherwise>
  222. </xsl:choose>
  223. </xsl:if>
  224. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-3']/@content)">
  225. <xsl:choose>
  226. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-3']">
  227. <xsl:variable name="author-link-3" select="/buildinfo/document/head/meta[@name='author-link-3']/@content" />
  228. , <a rel='author' href='{$author-link-3}'>
  229. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-3']/@content" /> </a>
  230. </xsl:when>
  231. <xsl:otherwise>
  232. , <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-3']/@content" />
  233. </xsl:otherwise>
  234. </xsl:choose>
  235. </xsl:if>
  236. <span class="label">&#160;<xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>: </span><xsl:value-of select="/buildinfo/document/head/meta[@name='publication-date']/@content" />
  237. <xsl:if test = "string(/buildinfo/document/head/meta[@name='pdf-link']/@content)">
  238. <span class="label">&#160;PDF: </span>
  239. <xsl:variable name="pdf-link" select="/buildinfo/document/head/meta[@name='pdf-link']/@content" />
  240. <a href='{$pdf-link}'>download</a>
  241. </xsl:if>
  242. </xsl:element> <!-- </p> -->
  243. </xsl:element> <!-- </div> -->
  244. </xsl:if>
  245. <!-- End Apply article rules -->
  246. <!--Article authors, date -->
  247. <xsl:if test="/buildinfo/document/author or /buildinfo/document/date or /buildinfo/document/download">
  248. <xsl:element name="div">
  249. <xsl:attribute name="id">article-metadata</xsl:attribute>
  250. <xsl:if test="/buildinfo/document/author">
  251. <span class="label"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'writtenby'" /></xsl:call-template>&#160;</span>
  252. <xsl:for-each select="/buildinfo/document/author">
  253. <xsl:variable name="id">
  254. <xsl:value-of select="@id" />
  255. </xsl:variable>
  256. <xsl:choose>
  257. <xsl:when test="@id and document('about/people/people.en.xml')/personset/person[@id=$id]">
  258. <!-- if the author is in fsfe's people.xml then we take information from there -->
  259. <xsl:choose>
  260. <xsl:when test="document('about/people/people.en.xml')/personset/person[@id=$id]/link">
  261. <xsl:element name="a">
  262. <xsl:attribute name="class">author</xsl:attribute>
  263. <xsl:attribute name="rel">author</xsl:attribute>
  264. <xsl:attribute name="href"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/link" /></xsl:attribute>
  265. <xsl:if test="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar">
  266. <xsl:element name="img">
  267. <xsl:attribute name="alt"></xsl:attribute>
  268. <xsl:attribute name="src"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar" /></xsl:attribute>
  269. </xsl:element>
  270. </xsl:if>
  271. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />
  272. </xsl:element>&#160;
  273. </xsl:when>
  274. <xsl:otherwise>
  275. <xsl:if test="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar">
  276. <xsl:element name="img">
  277. <xsl:attribute name="alt"></xsl:attribute>
  278. <xsl:attribute name="src"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar" /></xsl:attribute>
  279. </xsl:element>
  280. </xsl:if>
  281. <span class="author">
  282. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />&#160;
  283. </span>
  284. </xsl:otherwise>
  285. </xsl:choose>
  286. </xsl:when>
  287. <xsl:otherwise>
  288. <xsl:choose>
  289. <xsl:when test="link">
  290. <xsl:element name="a">
  291. <xsl:attribute name="class">author</xsl:attribute>
  292. <xsl:attribute name="rel">author</xsl:attribute>
  293. <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
  294. <xsl:if test="avatar">
  295. <xsl:element name="img">
  296. <xsl:attribute name="alt"></xsl:attribute>
  297. <xsl:attribute name="src"><xsl:value-of select="avatar" /></xsl:attribute>
  298. </xsl:element>
  299. </xsl:if>
  300. <xsl:value-of select="name" />
  301. </xsl:element>&#160;
  302. </xsl:when>
  303. <xsl:otherwise>
  304. <xsl:if test="avatar">
  305. <xsl:element name="img">
  306. <xsl:attribute name="alt"></xsl:attribute>
  307. <xsl:attribute name="src"><xsl:value-of select="avatar" /></xsl:attribute>
  308. </xsl:element>
  309. </xsl:if>
  310. <span class="author">
  311. <xsl:value-of select="name" />&#160;
  312. </span>
  313. </xsl:otherwise>
  314. </xsl:choose>
  315. </xsl:otherwise>
  316. </xsl:choose>
  317. </xsl:for-each>
  318. </xsl:if>
  319. <xsl:if test="/buildinfo/document/date">
  320. <span class="label"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>&#160;</span>
  321. <xsl:value-of select="/buildinfo/document/date/original/@content" />&#160;
  322. <xsl:if test="/buildinfo/document/date/revision">
  323. (<span class="label"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'revision'" /></xsl:call-template></span>
  324. <xsl:for-each select="/buildinfo/document/date/revision">
  325. &#160;<xsl:value-of select="@content" />
  326. </xsl:for-each>)&#160;
  327. </xsl:if>
  328. </xsl:if>
  329. <xsl:if test="/buildinfo/document/download">
  330. <span class="label"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'download'" /></xsl:call-template>&#160;</span>
  331. <xsl:element name="a">
  332. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/document/download/@content" /></xsl:attribute>
  333. <xsl:value-of select="/buildinfo/document/download/@type" />
  334. </xsl:element>
  335. </xsl:if>
  336. </xsl:element>
  337. </xsl:if>
  338. <!--End Article authors, date-->
  339. </xsl:template>
  340. <!-- End modifications to H1 -->
  341. <!-- Modify H2 -->
  342. <xsl:template match="h2">
  343. <!-- auto generate ID for headings if it doesn't already exist -->
  344. <xsl:call-template name="generate-id" />
  345. </xsl:template>
  346. <!-- Modify H3 -->
  347. <xsl:template match="h3">
  348. <!-- auto generate ID for headings if it doesn't already exist -->
  349. <xsl:call-template name="generate-id" />
  350. </xsl:template>
  351. <!-- Modify H4 -->
  352. <xsl:template match="h4">
  353. <!-- auto generate ID for headings if it doesn't already exist -->
  354. <xsl:call-template name="generate-id" />
  355. </xsl:template>
  356. <!-- Modify H4 -->
  357. <xsl:template match="h4">
  358. <!-- auto generate ID for headings if it doesn't already exist -->
  359. <xsl:call-template name="generate-id" />
  360. </xsl:template>
  361. <!-- Modify H5 -->
  362. <xsl:template match="h5">
  363. <!-- auto generate ID for headings if it doesn't already exist -->
  364. <xsl:call-template name="generate-id" />
  365. </xsl:template>
  366. <!-- Modify H6 -->
  367. <xsl:template match="h6">
  368. <!-- auto generate ID for headings if it doesn't already exist -->
  369. <xsl:call-template name="generate-id" />
  370. </xsl:template>
  371. <!-- Apply support page -->
  372. <xsl:template match="support-portal-javascript">
  373. <xsl:call-template name="support-portal-javascript" />
  374. </xsl:template>
  375. <xsl:template match="support-form-javascript">
  376. <xsl:call-template name="support-form-javascript" />
  377. </xsl:template>
  378. <xsl:template match="country-list-europe">
  379. <xsl:call-template name="country-list-europe" />
  380. </xsl:template>
  381. <xsl:template match="country-list-other-continents">
  382. <xsl:call-template name="country-list-other-continents" />
  383. </xsl:template>
  384. <!-- End apply support page rules -->
  385. <!-- HTML body -->
  386. <!--<xsl:template match="body">-->
  387. <xsl:template name="fsfe-body">
  388. <body>
  389. <!-- For pages used on external web servers, use absolute URLs -->
  390. <xsl:variable name="urlprefix"><xsl:if test="/buildinfo/document/@external">https://fsfe.org</xsl:if></xsl:variable>
  391. <!-- First of all, a comment to make clear this is generated -->
  392. <xsl:comment>This file was generated by an XSLT script. Please do not edit.</xsl:comment>
  393. <!-- Service notice (for downtime, upgrades, etc. enable this)
  394. <div id="service-notice">
  395. <div class="close">
  396. <a title="dismiss this notification">×</a>
  397. </div>
  398. <div class="text">
  399. <h1>Site currently under development</h1>
  400. <p>
  401. If you want to help out, <a
  402. href="/contribute/web/web.en.html">consider joining the
  403. web team</a>.
  404. </p>
  405. </div>
  406. </div>-->
  407. <xsl:element name="div">
  408. <xsl:attribute name="id">wrapper</xsl:attribute>
  409. <xsl:element name="div">
  410. <xsl:attribute name="id">wrapper-inner</xsl:attribute>
  411. <xsl:comment>Unnecessary div, for IE only</xsl:comment>
  412. <xsl:element name="p">
  413. <xsl:attribute name="class">n</xsl:attribute>
  414. <xsl:comment>Give non-graphical browsers a way to skip the menu.</xsl:comment>
  415. <xsl:element name="a">
  416. <xsl:attribute name="href">#content</xsl:attribute>
  417. <xsl:text>Skip menu</xsl:text>
  418. </xsl:element>
  419. </xsl:element>
  420. <!-- Page header -->
  421. <xsl:element name="div">
  422. <xsl:attribute name="id">header</xsl:attribute>
  423. <!-- Logo -->
  424. <xsl:element name="div">
  425. <xsl:attribute name="id">logo</xsl:attribute>
  426. <xsl:element name="a">
  427. <xsl:attribute name="href">/</xsl:attribute>
  428. <xsl:element name="img">
  429. <xsl:attribute name="alt">FSFE Logo</xsl:attribute>
  430. <xsl:attribute name="src">
  431. <xsl:value-of select="$urlprefix"/>
  432. <xsl:choose>
  433. <xsl:when test="$mode = 'valentine'">/graphics/logov.png</xsl:when>
  434. <xsl:otherwise>/graphics/logo_transparent.png</xsl:otherwise>
  435. </xsl:choose>
  436. </xsl:attribute>
  437. </xsl:element>
  438. </xsl:element>
  439. </xsl:element>
  440. <!-- Statement -->
  441. <xsl:element name="p">
  442. <xsl:attribute name="id">statement</xsl:attribute>
  443. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'statement1'" /></xsl:call-template>
  444. <xsl:element name="a">
  445. <xsl:attribute name="href">/about/basics/freesoftware.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  446. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'statement-fs'" /></xsl:call-template>
  447. </xsl:element>
  448. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'statement2'" /></xsl:call-template>.<!--intentional full stop goes here-->
  449. <xsl:element name="a">
  450. <xsl:attribute name="href">/about</xsl:attribute>
  451. <xsl:attribute name="style">padding-left: 1em;</xsl:attribute>
  452. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'learn-more'" />
  453. </xsl:call-template>
  454. </xsl:element>.<!--intentional full stop goes here-->
  455. </xsl:element>
  456. </xsl:element><!-- end Page header -->
  457. <!-- Sidebar -->
  458. <xsl:element name="div">
  459. <xsl:attribute name="id">sidebar</xsl:attribute>
  460. <!-- Menu -->
  461. <xsl:element name="div">
  462. <xsl:attribute name="id">menu</xsl:attribute>
  463. <xsl:element name="ul">
  464. <!-- FSFE portal menu -->
  465. <xsl:element name="li">
  466. <xsl:attribute name="class">fsfe</xsl:attribute>
  467. <xsl:element name="a">
  468. <xsl:attribute name="href">/</xsl:attribute>
  469. FSFE
  470. </xsl:element>
  471. <xsl:element name="ul">
  472. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  473. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fsfe']">
  474. <!--<xsl:sort select="@id"/>-->
  475. <xsl:sort select="@priority" />
  476. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  477. <xsl:element name="li">
  478. <xsl:choose>
  479. <xsl:when test="not(string(.))">
  480. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  481. </xsl:when>
  482. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  483. <xsl:element name="span">
  484. <xsl:attribute name="id">selected</xsl:attribute>
  485. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  486. </xsl:element>
  487. </xsl:when>
  488. <xsl:otherwise>
  489. <xsl:element name="a">
  490. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  491. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  492. </xsl:element>
  493. </xsl:otherwise>
  494. </xsl:choose>
  495. </xsl:element> <!-- /li -->
  496. </xsl:for-each>
  497. </xsl:element>
  498. </xsl:element> <!-- /li -->
  499. <!-- Support portal menu item -->
  500. <xsl:element name="li">
  501. <xsl:attribute name="class">support</xsl:attribute>
  502. <xsl:element name="a">
  503. <xsl:attribute name="href">/support/</xsl:attribute>
  504. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'support/support'" /></xsl:call-template>
  505. </xsl:element>
  506. </xsl:element> <!-- /li -->
  507. <!-- Fellowship portal menu -->
  508. <xsl:element name="li">
  509. <xsl:attribute name="class">fellowship</xsl:attribute>
  510. <xsl:element name="a">
  511. <xsl:attribute name="href">http://fellowship.fsfe.org/</xsl:attribute>
  512. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fellowship/fellowship'" /></xsl:call-template>
  513. </xsl:element>
  514. <xsl:element name="ul">
  515. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  516. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fellowship']">
  517. <!--<xsl:sort select="@id"/>-->
  518. <xsl:sort select="@priority" />
  519. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  520. <xsl:element name="li">
  521. <xsl:choose>
  522. <xsl:when test="not(string(.))">
  523. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  524. </xsl:when>
  525. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  526. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  527. </xsl:when>
  528. <xsl:otherwise>
  529. <xsl:element name="a">
  530. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  531. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  532. </xsl:element>
  533. </xsl:otherwise>
  534. </xsl:choose>
  535. </xsl:element> <!-- /li -->
  536. </xsl:for-each>
  537. </xsl:element><!-- end li -->
  538. </xsl:element><!-- end ul -->
  539. <!-- Planet portal menu -->
  540. <xsl:element name="li">
  541. <xsl:attribute name="class">planet</xsl:attribute>
  542. <xsl:element name="a">
  543. <xsl:attribute name="href">http://planet.fsfe.org/</xsl:attribute>
  544. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'planet/blogs'" /></xsl:call-template>
  545. </xsl:element>
  546. <!-- causes validation errors, needs li to pass validator?
  547. <xsl:element name="ul">
  548. </xsl:element>-->
  549. </xsl:element>
  550. <!-- Wiki -->
  551. <xsl:element name="li">
  552. <xsl:attribute name="class">wiki</xsl:attribute>
  553. <xsl:element name="a">
  554. <xsl:attribute name="href">http://wiki.fsfe.org/</xsl:attribute>
  555. Wiki
  556. </xsl:element>
  557. </xsl:element> <!-- /li -->
  558. </xsl:element> <!-- /ul -->
  559. </xsl:element><!-- end menu -->
  560. <xsl:element name="div">
  561. <xsl:attribute name="id">search</xsl:attribute>
  562. <xsl:element name="h2">
  563. <xsl:attribute name="class">n</xsl:attribute>
  564. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'search'" /></xsl:call-template>
  565. </xsl:element>
  566. <xsl:element name="form">
  567. <xsl:attribute name="method">get</xsl:attribute>
  568. <xsl:attribute name="action">http://fsfe.yacy.net/yacysearch.html</xsl:attribute>
  569. <xsl:element name="input">
  570. <xsl:attribute name="type">hidden</xsl:attribute>
  571. <xsl:attribute name="name">verify</xsl:attribute>
  572. <xsl:attribute name="value">true</xsl:attribute>
  573. </xsl:element>
  574. <xsl:element name="input">
  575. <xsl:attribute name="type">hidden</xsl:attribute>
  576. <xsl:attribute name="name">maximumRecords</xsl:attribute>
  577. <xsl:attribute name="value">10</xsl:attribute>
  578. </xsl:element>
  579. <xsl:element name="input">
  580. <xsl:attribute name="type">hidden</xsl:attribute>
  581. <xsl:attribute name="name">meanCount</xsl:attribute>
  582. <xsl:attribute name="value">5</xsl:attribute>
  583. </xsl:element>
  584. <xsl:element name="input">
  585. <xsl:attribute name="type">hidden</xsl:attribute>
  586. <xsl:attribute name="name">resource</xsl:attribute>
  587. <xsl:attribute name="value">local</xsl:attribute>
  588. </xsl:element>
  589. <xsl:element name="input">
  590. <xsl:attribute name="type">hidden</xsl:attribute>
  591. <xsl:attribute name="name">prefermaskfilter</xsl:attribute>
  592. <xsl:attribute name="value">.*.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  593. </xsl:element>
  594. <xsl:element name="input">
  595. <xsl:attribute name="type">hidden</xsl:attribute>
  596. <xsl:attribute name="name">prefermaskfilter</xsl:attribute>
  597. <xsl:attribute name="value">.*</xsl:attribute>
  598. </xsl:element>
  599. <xsl:element name="input">
  600. <xsl:attribute name="type">hidden</xsl:attribute>
  601. <xsl:attribute name="name">display</xsl:attribute>
  602. <xsl:attribute name="value">2</xsl:attribute>
  603. </xsl:element>
  604. <xsl:element name="input">
  605. <xsl:attribute name="type">hidden</xsl:attribute>
  606. <xsl:attribute name="name">nav</xsl:attribute>
  607. <xsl:attribute name="value">hosts</xsl:attribute>
  608. </xsl:element>
  609. <xsl:element name="p">
  610. <xsl:element name="input">
  611. <xsl:attribute name="type">image</xsl:attribute>
  612. <xsl:attribute name="src">/graphics/icons/search-button.png</xsl:attribute>
  613. <xsl:attribute name="alt">
  614. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'submit'" /></xsl:call-template>
  615. </xsl:attribute>
  616. </xsl:element>
  617. <xsl:element name="input">
  618. <xsl:attribute name="type">text</xsl:attribute>
  619. <xsl:attribute name="name">query</xsl:attribute>
  620. <xsl:attribute name="placeholder">
  621. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'search'" /></xsl:call-template>
  622. </xsl:attribute>
  623. </xsl:element>
  624. <!--
  625. <xsl:element name="input">
  626. <xsl:attribute name="type">submit</xsl:attribute>
  627. <xsl:attribute name="name">search</xsl:attribute>
  628. <xsl:attribute name="value">
  629. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'submit'" /></xsl:call-template>
  630. </xsl:attribute>
  631. </xsl:element>
  632. -->
  633. </xsl:element>
  634. </xsl:element>
  635. </xsl:element><!-- End search -->
  636. <!-- Newsletter form
  637. <xsl:element name="div">
  638. <xsl:attribute name="id">newsletter</xsl:attribute>
  639. <xsl:element name="h2">
  640. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'receive-newsletter'" /></xsl:call-template>
  641. </xsl:element>
  642. <xsl:element name="form">
  643. <xsl:attribute name="method">get</xsl:attribute>
  644. <xsl:attribute name="action">http://fsfe.yacy.net/yacysearch.html</xsl:attribute>
  645. <xsl:element name="p">
  646. <xsl:element name="select">
  647. <xsl:attribute name="name">lang</xsl:attribute>
  648. <option><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'language'" /></xsl:call-template></option>
  649. </xsl:element>
  650. </xsl:element>
  651. <xsl:element name="p">
  652. <xsl:element name="input">
  653. <xsl:attribute name="type">image</xsl:attribute>
  654. <xsl:attribute name="src">/graphics/icons/search-button.png</xsl:attribute>
  655. </xsl:element>
  656. <xsl:element name="input">
  657. <xsl:attribute name="type">text</xsl:attribute>
  658. <xsl:attribute name="name">query</xsl:attribute>
  659. <xsl:attribute name="placeholder">
  660. email@example.org
  661. </xsl:attribute>
  662. </xsl:element>
  663. </xsl:element>
  664. </xsl:element>
  665. </xsl:element>
  666. end Newsletter form -->
  667. <!-- translations -->
  668. <xsl:element name="div">
  669. <xsl:attribute name="id">translations</xsl:attribute>
  670. <xsl:element name="ul">
  671. <xsl:for-each select="/buildinfo/trlist/tr">
  672. <xsl:sort select="@id"/>
  673. <xsl:choose>
  674. <xsl:when test="@id=/buildinfo/@language">
  675. <xsl:element name="li">
  676. <xsl:value-of select="." disable-output-escaping="yes"/>
  677. </xsl:element>
  678. </xsl:when>
  679. <xsl:otherwise>
  680. <xsl:element name="li">
  681. <xsl:element name="a">
  682. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
  683. <xsl:value-of select="." disable-output-escaping="yes"/>
  684. </xsl:element>
  685. </xsl:element>
  686. </xsl:otherwise>
  687. </xsl:choose>
  688. </xsl:for-each>
  689. </xsl:element><!-- end translations -->
  690. </xsl:element><!-- End sidebar -->
  691. </xsl:element>
  692. <xsl:element name="div">
  693. <xsl:attribute name="id">content</xsl:attribute>
  694. <!-- Outdated note -->
  695. <xsl:if test="/buildinfo/@outdated='yes'">
  696. <xsl:element name="p">
  697. <xsl:attribute name="class">warning red</xsl:attribute>
  698. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'outdated'" /></xsl:call-template>
  699. </xsl:element>
  700. </xsl:if>
  701. <!-- Missing translation note -->
  702. <xsl:if test="/buildinfo/@language!=/buildinfo/document/@language">
  703. <xsl:element name="p">
  704. <xsl:attribute name="class">warning red</xsl:attribute>
  705. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'notranslation'" /></xsl:call-template>
  706. </xsl:element>
  707. </xsl:if>
  708. <!-- Info box -->
  709. <xsl:element name="div">
  710. <xsl:attribute name="id">infobox</xsl:attribute>
  711. <!-- Add under construction message -->
  712. <xsl:if test = "/buildinfo/document/head/meta[@name='under-construction' and @content='true']">
  713. <xsl:element name="p">
  714. <xsl:attribute name="class">warning yellow</xsl:attribute>
  715. <xsl:call-template name="fsfe-gettext">
  716. <xsl:with-param name="id" select="'under-construction'" />
  717. </xsl:call-template>
  718. </xsl:element>
  719. </xsl:if>
  720. <!-- Add project completed message -->
  721. <xsl:if test = "/buildinfo/document/head/meta[@name='project-complete' and @content='true']">
  722. <xsl:element name="p">
  723. <xsl:attribute name="class">warning green</xsl:attribute>
  724. <xsl:call-template name="fsfe-gettext">
  725. <xsl:with-param name="id" select="'project-complete'" />
  726. </xsl:call-template>
  727. </xsl:element>
  728. </xsl:if>
  729. </xsl:element>
  730. <!-- Fundraising box
  731. <xsl:element name="div">
  732. <xsl:attribute name="id">fundraising</xsl:attribute>
  733. <xsl:element name="h2">
  734. <xsl:apply-templates select="/buildinfo/fundraising/call1/node()"/>
  735. </xsl:element>
  736. <xsl:element name="div">
  737. <xsl:attribute name="class">button</xsl:attribute>
  738. <xsl:apply-templates select="/buildinfo/fundraising/call2/node()"/>
  739. </xsl:element>
  740. <xsl:element name="div">
  741. <xsl:attribute name="class">button</xsl:attribute>
  742. <xsl:apply-templates select="/buildinfo/fundraising/call3/node()"/>
  743. </xsl:element>
  744. <xsl:element name="img">
  745. <xsl:attribute name="src">/graphics/wreath.png</xsl:attribute>
  746. <xsl:attribute name="alt">wreath</xsl:attribute>
  747. <xsl:attribute name="class">right</xsl:attribute>
  748. </xsl:element>
  749. <xsl:element name="p">
  750. <xsl:attribute name="class">call4</xsl:attribute>
  751. <xsl:apply-templates select="/buildinfo/fundraising/call4/node()"/>
  752. </xsl:element>
  753. disabling the progress bar
  754. <xsl:if test="/buildinfo/fundraising/current">
  755. <xsl:element name="div">
  756. <xsl:attribute name="class">percentbox</xsl:attribute>
  757. <xsl:element name="div">
  758. <xsl:attribute name="class">percentbar</xsl:attribute>
  759. <xsl:attribute name="style">width: 45.9%</xsl:attribute>
  760. </xsl:element>
  761. </xsl:element>
  762. <xsl:element name="p">
  763. <xsl:attribute name="class">current</xsl:attribute>
  764. <xsl:apply-templates select="/buildinfo/fundraising/current/node()"/>
  765. <xsl:text>€ 45 860</xsl:text>
  766. </xsl:element>
  767. <xsl:element name="p">
  768. <xsl:attribute name="class">target</xsl:attribute>
  769. <xsl:text>€ 100 000</xsl:text>
  770. </xsl:element>
  771. </xsl:if> c
  772. </xsl:element>-->
  773. <!-- End Fundraising box -->
  774. <!-- Here goes the actual content of the <body> node of the input file -->
  775. <xsl:apply-templates select="body | /buildinfo/document/event/body | /buildinfo/document/news/body" />
  776. <!-- Link to top -->
  777. <xsl:element name="p">
  778. <xsl:attribute name="class">n</xsl:attribute>
  779. <xsl:element name="a">
  780. <xsl:attribute name="href">#top</xsl:attribute>
  781. <xsl:text>To top</xsl:text>
  782. </xsl:element>
  783. </xsl:element>
  784. </xsl:element>
  785. <!-- End Content -->
  786. </xsl:element><!--end wrapper-inner-->
  787. <!-- licenses -->
  788. <xsl:if test = "/buildinfo/document/legal">
  789. <div id="legal">
  790. <p>
  791. <xsl:choose>
  792. <xsl:when test = "/buildinfo/document/legal/license">
  793. <xsl:element name="a">
  794. <xsl:attribute name="href">
  795. <xsl:value-of select="/buildinfo/document/legal/license"/>
  796. </xsl:attribute>
  797. <xsl:attribute name="rel">license</xsl:attribute>
  798. <xsl:if test ="/buildinfo/document/legal/@type='cc-license'">
  799. <xsl:element name="img">
  800. <xsl:attribute name="src">/graphics/cc-logo.png</xsl:attribute>
  801. <xsl:attribute name="alt">
  802. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'creative-commons-license'" /></xsl:call-template>
  803. </xsl:attribute>
  804. </xsl:element>
  805. </xsl:if>
  806. <xsl:value-of select="/buildinfo/document/legal/notice"/>
  807. </xsl:element>
  808. </xsl:when>
  809. <xsl:otherwise>
  810. <xsl:value-of select="/buildinfo/document/legal/notice"/>
  811. </xsl:otherwise>
  812. </xsl:choose>
  813. </p>
  814. </div>
  815. </xsl:if>
  816. <!--Depreciated: it's here only for "backward compatibility" cc license way-->
  817. <xsl:if test = "string(/buildinfo/document/head/meta[@name='cc-license']/@content)">
  818. <xsl:element name="div">
  819. <xsl:attribute name="id">cc-licenses</xsl:attribute>
  820. <xsl:element name="p">
  821. <xsl:element name="img">
  822. <xsl:attribute name="src">/graphics/cc-logo.png</xsl:attribute>
  823. <xsl:attribute name="alt">Creative Commons logo</xsl:attribute>
  824. </xsl:element> <!-- </img> -->
  825. <xsl:for-each select="/buildinfo/document/head/meta[@name='cc-license']">
  826. <xsl:value-of select="@content"/> •
  827. </xsl:for-each>
  828. <!--<xsl:value-of select="/buildinfo/document/head/meta[@name='cc-license-1']/@content" /> • -->
  829. </xsl:element> <!-- </p> -->
  830. </xsl:element> <!-- </div> -->
  831. </xsl:if>
  832. <!-- End cc licenses -->
  833. <!-- Footer -->
  834. <div id="footer">
  835. <div id="notice">
  836. <p>
  837. Copyright © 2001-2013 <a href="/">Free Software
  838. Foundation Europe</a>. <strong>
  839. <a href="/contact/contact.html">
  840. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'contact-us'" /></xsl:call-template>
  841. </a></strong>.<br />
  842. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'permission'" /></xsl:call-template><br />
  843. <!-- "Last changed" magic -->
  844. <xsl:variable name="timestamp">
  845. <xsl:value-of select="/buildinfo/document/timestamp"/>
  846. </xsl:variable>
  847. <!-- FIXME: over time, all pages should have the timestamp -->
  848. <!-- tags, so this conditional could be removed -->
  849. <xsl:if test="string-length($timestamp) &gt; 0">
  850. <xsl:variable name="Date">
  851. <xsl:value-of select="substring-before(substring-after($timestamp, 'Date: '), ' $')"/>
  852. </xsl:variable>
  853. <xsl:variable name="Author">
  854. <xsl:value-of select="substring-before(substring-after($timestamp, 'Author: '), ' $')"/>
  855. </xsl:variable>
  856. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'lastchanged'" /></xsl:call-template>
  857. <xsl:value-of select="translate ($Date, '/', '-')"/>
  858. (<xsl:value-of select="$Author"/>)
  859. </xsl:if>
  860. </p>
  861. <ul>
  862. <li>
  863. <!-- Link to the XHTML source -->
  864. <xsl:element name="a">
  865. <xsl:attribute name="href">
  866. <xsl:text>/source</xsl:text>
  867. <xsl:value-of select="/buildinfo/@filename"/>
  868. <xsl:text>.</xsl:text>
  869. <xsl:value-of select="/buildinfo/document/@language"/>
  870. <xsl:text>.xhtml</xsl:text>
  871. </xsl:attribute>
  872. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'source'" /></xsl:call-template>
  873. </xsl:element>
  874. </li>
  875. <li>
  876. <a href="/contribute/translators/">
  877. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translate'" /></xsl:call-template>
  878. </a>
  879. </li>
  880. <li>
  881. <a href="/about/legal/imprint.html">
  882. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'imprint'" /></xsl:call-template>
  883. </a>
  884. </li>
  885. </ul>
  886. <p>
  887. <!-- Insert the appropriate translation notice -->
  888. <xsl:if test="/buildinfo/document/@language!=/buildinfo/@original">
  889. <xsl:choose>
  890. <xsl:when test="/buildinfo/document/translator">
  891. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator1a'" /></xsl:call-template>
  892. <xsl:value-of select="/buildinfo/document/translator"/>
  893. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator1b'" /></xsl:call-template>
  894. </xsl:when>
  895. <xsl:otherwise>
  896. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator2'" /></xsl:call-template>
  897. </xsl:otherwise>
  898. </xsl:choose>
  899. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3a'" /></xsl:call-template>
  900. <xsl:element name="a">
  901. <xsl:attribute name="href">
  902. <xsl:value-of select="/buildinfo/@filename"/>
  903. <xsl:text>.en.html</xsl:text>
  904. </xsl:attribute>
  905. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3b'" /></xsl:call-template>
  906. </xsl:element>
  907. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3c'" /></xsl:call-template>
  908. </xsl:if>
  909. </p>
  910. </div> <!-- /#notice -->
  911. <!-- Sister organizations -->
  912. <xsl:element name="div">
  913. <xsl:attribute name="id">sister-organisations</xsl:attribute>
  914. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfnetwork'" /></xsl:call-template>
  915. </xsl:element>
  916. </div> <!-- /#footer -->
  917. <!-- Piwik -->
  918. <script type="text/javascript">
  919. var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.fsfe.org/" : "http://piwik.fsfe.org/");
  920. document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
  921. </script><script type="text/javascript">
  922. try {
  923. var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 4);
  924. piwikTracker.trackPageView();
  925. piwikTracker.enableLinkTracking();
  926. } catch( err ) {}
  927. </script><noscript><p><img src="http://piwik.fsfe.org/piwik.php?idsite=4" style="border:0" alt="" /></p></noscript>
  928. <!-- End Piwik Tracking Code -->
  929. </xsl:element>
  930. </body>
  931. </xsl:template>
  932. <!-- Insert local menu -->
  933. <xsl:template match="localmenu">
  934. <xsl:variable name="set">
  935. <xsl:choose>
  936. <xsl:when test="@set">
  937. <xsl:value-of select="@set"/>
  938. </xsl:when>
  939. <xsl:otherwise>
  940. <xsl:text>0</xsl:text>
  941. </xsl:otherwise>
  942. </xsl:choose>
  943. </xsl:variable>
  944. <xsl:variable name="dir">
  945. <xsl:value-of select="/buildinfo/@dirname"/>
  946. </xsl:variable>
  947. <xsl:variable name="language">
  948. <xsl:value-of select="/buildinfo/@language"/>
  949. </xsl:variable>
  950. <xsl:element name="div">
  951. <xsl:attribute name="class">localmenu</xsl:attribute>
  952. <xsl:element name="p">
  953. <xsl:text>[ </xsl:text>
  954. <xsl:for-each select="/buildinfo/localmenuset/localmenuitems/menu[@dir=$dir and @set=$set]">
  955. <xsl:sort select="@id"/>
  956. <xsl:variable name="style"><xsl:value-of select="@style"/></xsl:variable>
  957. <xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
  958. <xsl:variable name="localmenutext">
  959. <xsl:choose>
  960. <xsl:when
  961. test="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language=$language]">
  962. <xsl:value-of
  963. select="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language=$language]"/>
  964. </xsl:when>
  965. <xsl:otherwise>
  966. <xsl:value-of
  967. select="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language='en']"/>
  968. </xsl:otherwise>
  969. </xsl:choose>
  970. </xsl:variable>
  971. <xsl:element name="span">
  972. <xsl:attribute name="class">local_menu_item</xsl:attribute>
  973. <xsl:choose>
  974. <xsl:when test="not(substring-before(concat(/buildinfo/@filename ,'.html'), string(.)))">
  975. <xsl:element name="a">
  976. <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
  977. <xsl:value-of select="$localmenutext"/>
  978. </xsl:element>
  979. </xsl:when>
  980. <xsl:otherwise>
  981. <xsl:attribute name="href">bamboo</xsl:attribute>
  982. <xsl:value-of select="$localmenutext"/>
  983. </xsl:otherwise>
  984. </xsl:choose>
  985. </xsl:element>
  986. <xsl:if test="position()!=last()">
  987. <xsl:choose>
  988. <xsl:when test="$style='number'">
  989. <xsl:text> | </xsl:text>
  990. </xsl:when>
  991. <xsl:otherwise>
  992. <xsl:text> ] [ </xsl:text>
  993. </xsl:otherwise>
  994. </xsl:choose>
  995. </xsl:if>
  996. </xsl:for-each>
  997. <xsl:text> ]</xsl:text>
  998. </xsl:element><!--end wrapper-->
  999. </xsl:element>
  1000. </xsl:template>
  1001. <!-- Ignore "latin" tags, used only for pritable material -->
  1002. <xsl:template match="latin">
  1003. <xsl:apply-templates select="@*|node()"/>
  1004. </xsl:template>
  1005. <!-- If no template matching <body> is found in the current page's XSL file, this one will be used -->
  1006. <xsl:template match="body" priority="-1">
  1007. <xsl:apply-templates />
  1008. </xsl:template>
  1009. <!-- Do not copy non-HTML elements to output -->
  1010. <xsl:template match="timestamp|
  1011. buildinfo/document/translator|
  1012. buildinfo/set|
  1013. buildinfo/textset|
  1014. buildinfo/textsetbackup|
  1015. buildinfo/menuset|
  1016. buildinfo/trlist|
  1017. buildinfo/fundraising|
  1018. buildinfo/localmenuset|
  1019. buildinfo/document/tags|
  1020. buildinfo/document/legal|
  1021. buildinfo/document/author|
  1022. buildinfo/document/date|
  1023. buildinfo/document/download"/>
  1024. <xsl:template match="set | tags | text"/>
  1025. <!-- For all other nodes, copy verbatim -->
  1026. <xsl:template match="@*|node()" priority="-1">
  1027. <xsl:copy>
  1028. <xsl:apply-templates select="@* | node()"/>
  1029. </xsl:copy>
  1030. </xsl:template>
  1031. <xsl:template match="@dt:*">
  1032. <xsl:attribute name="{local-name()}">
  1033. <xsl:value-of select="." />
  1034. </xsl:attribute>
  1035. </xsl:template>
  1036. <!--
  1037. <xsl:template match="@x:*">
  1038. <xsl:attribute name="{local-name()}">
  1039. <xsl:value-of select="." />
  1040. </xsl:attribute>
  1041. </xsl:template>
  1042. -->
  1043. </xsl:stylesheet>