Bläddra i källkod

fixed event link double-occurrence; added guid to nes and events RSS feeds

svn path=/trunk/; revision=20179
tags/stw2018
nicoulas 8 år sedan
förälder
incheckning
896611a863
4 ändrade filer med 32 tillägg och 24 borttagningar
  1. 9
    4
      events/events.rss.xsl
  2. 10
    5
      news/news.rss.xsl
  3. 3
    6
      tools/xsltsl/events-utils.xsl
  4. 10
    9
      tools/xsltsl/feeds.xsl

+ 9
- 4
events/events.rss.xsl Visa fil

@@ -31,7 +31,7 @@
<channel>
<title>FSFE Events</title>
<description>Free Software Events</description>
<link>http://www.fsfeurope.org/events/</link>
<link>http://fsfe.org/events/</link>
<language><xsl:value-of select="$lang" /></language>
<copyright>Copyright (c) FSF Europe. Verbatim copying and distribution
of this entire article is permitted in any medium, provided this
@@ -39,11 +39,11 @@
<managingEditor>press@fsfeurope.org (FSFE Press Team)</managingEditor>
<webMaster>web@fsfeurope.org (FSFE Webmaster Team)</webMaster>
<image>
<url>http://fsfeurope.org/events/fsfe-events.png</url>
<url>http://fsfe.org/events/fsfe-events.png</url>
<title>FSFE Events</title>
<width>88</width>
<height>31</height>
<link>http://www.fsfeurope.org/events/</link>
<link>http://fsfe.org/events/</link>
</image>

<!-- Event items -->
@@ -54,7 +54,12 @@
<xsl:variable name="start"><xsl:value-of select="@start" /></xsl:variable>
<xsl:variable name="end"><xsl:value-of select="@end" /></xsl:variable>
<item>

<!-- <guid> -->
<xsl:element name="guid">
<xsl:value-of select="@filename"/>
</xsl:element>
<!-- Title -->
<xsl:element name="title">
<xsl:value-of select="title"/>

+ 10
- 5
news/news.rss.xsl Visa fil

@@ -128,6 +128,11 @@
<xsl:if test="position() &lt; 11">
<xsl:element name="item">
<!-- guid -->
<xsl:element name="guid">
<xsl:value-of select="@filename"/>
</xsl:element>
<!-- Title -->
<xsl:element name="title">
<xsl:value-of select="title"/>
@@ -137,8 +142,8 @@
<xsl:element name="description">
<xsl:copy-of select="normalize-space(body)"/>
<xsl:text>
Become a member, join the Fellowship: https://fellowship.fsfe.org/login/join.php
Support our work, make a donation: http://fsfe.org/donate/donate.html</xsl:text>
Support FSFE, join the Fellowship: https://fellowship.fsfe.org/login/join.php
Make a one time donation: http://fsfe.org/donate/donate.html</xsl:text>
</xsl:element>
<!-- News body -->
@@ -155,7 +160,7 @@ Support our work, make a donation: http://fsfe.org/donate/donate.html</xsl:text>
<xsl:element name="p">
<xsl:text>Become a member, </xsl:text>
<xsl:text>Support FSFE, </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">https://fellowship.fsfe.org/login/join.php</xsl:attribute>
<xsl:text>join the Fellowship</xsl:text>
@@ -163,10 +168,10 @@ Support our work, make a donation: http://fsfe.org/donate/donate.html</xsl:text>
<xsl:element name="br" />
<xsl:text>Support our work, </xsl:text>
<xsl:text>Make a </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">http://fsfe.org/donate/donate.html</xsl:attribute>
<xsl:text>make a donation</xsl:text>
<xsl:text>one time donation</xsl:text>
</xsl:element>
</xsl:element>

+ 3
- 6
tools/xsltsl/events-utils.xsl Visa fil

@@ -28,9 +28,7 @@
</xsl:apply-templates>
</xsl:variable>
<xsl:element name="link">
<xsl:value-of select="normalize-space($link)"/>
</xsl:element>
<xsl:value-of select="normalize-space($link)"/>
</xsl:when>
@@ -45,9 +43,8 @@
<xsl:value-of select="$lang" />
<xsl:text>.html#</xsl:text>
<xsl:value-of select="normalize-space(@start)" />
<xsl:text>-</xsl:text>
<xsl:value-of select="translate( normalize-space(title), ' ', '-' )" />
<!-- anchor value -->
<xsl:value-of select="@filename" />
</xsl:otherwise>

+ 10
- 9
tools/xsltsl/feeds.xsl Visa fil

@@ -101,19 +101,19 @@
<xsl:value-of select="/html/text [@id = $header]" />
</h2>
</xsl:if>

<!-- provide an anchor for each event so that it can be linked to from the events rss feed -->
<xsl:element name="a">
<xsl:attribute name="name">
<xsl:value-of select="normalize-space(@start)" />
<xsl:text>-</xsl:text>
<xsl:value-of select="translate( normalize-space(title), ' ', '-' )" />
</xsl:attribute>
</xsl:element>
<!-- Now, the event block -->
<div class="entry">
<!-- provide an anchor for each event so that it can be linked to from the events rss feed -->
<xsl:element name="a">
<xsl:attribute name="name">
<xsl:value-of select="@filename" />
</xsl:attribute>
</xsl:element> <!-- end <a name="…"> -->
<!-- event title with or without link -->
<xsl:choose>
<xsl:when test="$link != ''">
<h3>
@@ -136,6 +136,7 @@
</xsl:otherwise>
</xsl:choose>
<!-- event date -->
<xsl:choose>
<xsl:when test="$start != $end">
<p class="date">

Laddar…
Avbryt
Spara