Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
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 50KB

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