Browse Source

changed the style of the news archive and added author, tags and new sidebar style

sansusann 1 year ago
parent
commit
7d5a1e83f2
5 changed files with 287 additions and 196 deletions
  1. 91
    88
      build/xslt/fsfe_sidebar.xsl
  2. 28
    0
      look/fsfe.less
  3. 8
    19
      news/news.en.xhtml
  4. 116
    46
      news/news.xsl
  5. 44
    43
      news/xhtml2xml.xsl

+ 91
- 88
build/xslt/fsfe_sidebar.xsl View File

@@ -1,59 +1,56 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 
3 3
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
-
5
-  <xsl:template name="sidebar">
6
-    <xsl:element name="aside">
7
-      <xsl:attribute name="id">sidebar</xsl:attribute>
8 4
   
5
+  <xsl:template name="sidebar">
6
+    <aside id="sidebar">
9 7
       <xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'newsletter'">
10
-        <xsl:element name="h3">
11
-          <xsl:call-template name="fsfe-gettext">
12
-            <xsl:with-param name="id" select="'receive-newsletter'" />
13
-          </xsl:call-template>
14
-        </xsl:element>
8
+        <h3><xsl:call-template name="fsfe-gettext">
9
+          <xsl:with-param name="id" select="'receive-newsletter'" />
10
+        </xsl:call-template></h3>
15 11
         <xsl:call-template name="subscribe-nl" />
16
-        <ul><li><a href="/news/newsletter.html">
17
-          <xsl:call-template name="fsfe-gettext">
18
-            <xsl:with-param name="id" select="'news/nl'" />
19
-          </xsl:call-template>
20
-        </a></li><li><a href="/news/news.html">
21
-          <xsl:call-template name="fsfe-gettext">
22
-            <xsl:with-param name="id" select="'news/news'" />
23
-          </xsl:call-template>
24
-        </a></li><li><a href="/events/events.html">
25
-          <xsl:call-template name="fsfe-gettext">
26
-            <xsl:with-param name="id" select="'news/events'" />
27
-          </xsl:call-template>
28
-        </a></li><li><a href="http://planet.fsfe.org">
29
-          <xsl:call-template name="fsfe-gettext">
30
-            <xsl:with-param name="id" select="'news/planet'" />
31
-          </xsl:call-template>
32
-        </a></li><li><a href="/contact/community.html">
33
-          <xsl:call-template name="fsfe-gettext">
34
-            <xsl:with-param name="id" select="'community/discuss'" />
35
-          </xsl:call-template>
36
-        </a></li></ul>
12
+        <ul>
13
+          <li><a href="/news/newsletter.html">
14
+            <xsl:call-template name="fsfe-gettext">
15
+              <xsl:with-param name="id" select="'news/nl'" />
16
+            </xsl:call-template></a></li>
17
+          <li><a href="/news/news.html">
18
+            <xsl:call-template name="fsfe-gettext">
19
+              <xsl:with-param name="id" select="'news/news'" />
20
+            </xsl:call-template></a></li>
21
+          <li><a href="/events/events.html">
22
+            <xsl:call-template name="fsfe-gettext">
23
+              <xsl:with-param name="id" select="'news/events'" />
24
+            </xsl:call-template></a></li>
25
+          <li><a href="http://planet.fsfe.org">
26
+            <xsl:call-template name="fsfe-gettext">
27
+              <xsl:with-param name="id" select="'news/planet'" />
28
+            </xsl:call-template></a></li>
29
+          <li><a href="/contact/community.html">
30
+            <xsl:call-template name="fsfe-gettext">
31
+              <xsl:with-param name="id" select="'community/discuss'" />
32
+            </xsl:call-template></a></li>
33
+        </ul>
37 34
       </xsl:if>
38 35
   
39 36
       <xsl:if test="string(/buildinfo/document/@newsdate) and count(/buildinfo/document/@type) = 0">
40 37
         <h3><xsl:call-template name="fsfe-gettext">
41 38
           <xsl:with-param name="id" select="'fsfe/press'" />
42 39
         </xsl:call-template></h3>
43
-
44
-        <ul><li><a href="/press/press.html">
45
-          <xsl:call-template name="fsfe-gettext">
46
-            <xsl:with-param name="id" select="'news/press'" />
47
-          </xsl:call-template>
48
-        </a></li><li><a href="/news/news.html">
49
-          <xsl:call-template name="fsfe-gettext">
50
-            <xsl:with-param name="id" select="'news/news'" />
51
-          </xsl:call-template>
52
-        </a></li><li><a href="/about/basics/freesoftware.html">
53
-          <xsl:call-template name="fsfe-gettext">
54
-            <xsl:with-param name="id" select="'fs/basics'" />
55
-          </xsl:call-template>
56
-        </a></li></ul>
40
+        <ul>
41
+          <li><a href="/press/press.html">
42
+            <xsl:call-template name="fsfe-gettext">
43
+              <xsl:with-param name="id" select="'news/press'" />
44
+            </xsl:call-template></a></li>
45
+          <li><a href="/news/news.html">
46
+            <xsl:call-template name="fsfe-gettext">
47
+              <xsl:with-param name="id" select="'news/news'" />
48
+            </xsl:call-template></a></li>
49
+          <li><a href="/about/basics/freesoftware.html">
50
+            <xsl:call-template name="fsfe-gettext">
51
+              <xsl:with-param name="id" select="'fs/basics'" />
52
+            </xsl:call-template></a></li>
53
+        </ul>
57 54
       </xsl:if>
58 55
   
59 56
       <xsl:apply-templates select="/buildinfo/document/sidebar/node()" />
@@ -66,56 +63,62 @@
66 63
         </a>
67 64
       </xsl:if>
68 65
 
69
-      <xsl:choose><xsl:when test = "/buildinfo/document/sidebar/@promo = 'our-work'">
70
-        <h3 class="promo"><xsl:call-template name="fsfe-gettext">
71
-          <xsl:with-param name="id" select="'our-work'" />
72
-        </xsl:call-template></h3>
73
-        <xsl:call-template name="fsfe-gettext">
74
-          <xsl:with-param name="id" select="'our-work-intro'" />
75
-        </xsl:call-template>
76
-        <a href="/work.html" class="learn-more"><xsl:call-template name="fsfe-gettext">
77
-            <xsl:with-param name="id" select="'learn-more'" />
78
-        </xsl:call-template></a>
66
+      <xsl:choose>
67
+        <xsl:when test = "/buildinfo/document/sidebar/@promo = 'our-work'">
68
+          <h3 class="promo"><xsl:call-template name="fsfe-gettext">
69
+            <xsl:with-param name="id" select="'our-work'" />
70
+          </xsl:call-template></h3>
71
+          <xsl:call-template name="fsfe-gettext">
72
+            <xsl:with-param name="id" select="'our-work-intro'" />
73
+          </xsl:call-template>
74
+          <a href="/work.html" class="learn-more">
75
+            <xsl:call-template name="fsfe-gettext">
76
+              <xsl:with-param name="id" select="'learn-more'" />
77
+          </xsl:call-template></a>
79 78
 
80
-      </xsl:when><xsl:when test = "/buildinfo/document/sidebar/@promo = 'about-fsfe'">
81
-        <h3 class="promo"><xsl:call-template name="fsfe-gettext">
82
-          <xsl:with-param name="id" select="'about-fsfe'" />
83
-        </xsl:call-template></h3>
84
-        <xsl:call-template name="fsfe-gettext">
85
-          <xsl:with-param name="id" select="'about-fsfe-intro'" />
86
-        </xsl:call-template>
87
-        <a href="/about/about.html" class="learn-more"><xsl:call-template name="fsfe-gettext">
88
-          <xsl:with-param name="id" select="'learn-more'" />
89
-        </xsl:call-template></a>
79
+        </xsl:when><xsl:when test = "/buildinfo/document/sidebar/@promo = 'about-fsfe'">
80
+          <h3 class="promo"><xsl:call-template name="fsfe-gettext">
81
+            <xsl:with-param name="id" select="'about-fsfe'" />
82
+          </xsl:call-template></h3>
83
+          <xsl:call-template name="fsfe-gettext">
84
+            <xsl:with-param name="id" select="'about-fsfe-intro'" />
85
+          </xsl:call-template>
86
+          <a href="/about/about.html" class="learn-more">
87
+            <xsl:call-template name="fsfe-gettext">
88
+              <xsl:with-param name="id" select="'learn-more'" />
89
+          </xsl:call-template></a>
90 90
 
91
-      </xsl:when><xsl:when test = "/buildinfo/document/sidebar/@promo = 'donate'">
92
-        <h3 class="promo"><xsl:call-template name="fsfe-gettext">
91
+        </xsl:when><xsl:when test = "/buildinfo/document/sidebar/@promo = 'donate'">
92
+          <h3 class="promo"><xsl:call-template name="fsfe-gettext">
93 93
             <xsl:with-param name="id" select="'donate'" />
94
-        </xsl:call-template></h3>
95
-        <xsl:call-template name="fsfe-gettext">
96
-          <xsl:with-param name="id" select="'donate-paragraph'" />
97
-        </xsl:call-template>
98
-        <a href="/donate/donate.html#ref-sidebar" class="learn-more big-donate">
94
+          </xsl:call-template></h3>
99 95
           <xsl:call-template name="fsfe-gettext">
100
-            <xsl:with-param name="id" select="'donate'" />
96
+            <xsl:with-param name="id" select="'donate-paragraph'" />
101 97
           </xsl:call-template>
102
-        </a>
98
+          <a href="/donate/donate.html#ref-sidebar" class="learn-more big-donate">
99
+            <xsl:call-template name="fsfe-gettext">
100
+              <xsl:with-param name="id" select="'donate'" />
101
+          </xsl:call-template></a>
103 102
 
104
-      <!--otherwise display about-fsfe-->
105
-      </xsl:when><xsl:when test = "not(/buildinfo/document/sidebar/@promo = 'no')">
106
-        <h3 class="promo"><xsl:call-template name="fsfe-gettext">
107
-          <xsl:with-param name="id" select="'about-fsfe'" />
108
-        </xsl:call-template></h3>
109
-        <xsl:call-template name="fsfe-gettext">
110
-          <xsl:with-param name="id" select="'about-fsfe-intro'" />
111
-        </xsl:call-template>
112
-        <a href="/about/about.html" class="learn-more"><xsl:call-template name="fsfe-gettext">
113
-          <xsl:with-param name="id" select="'learn-more'" />
114
-        </xsl:call-template></a>
115
-      </xsl:when></xsl:choose>
116
-  
117
-    </xsl:element>
118
-    <!--/aside#sidebar-->
103
+        <!-- empty sidebar -->
104
+        </xsl:when><xsl:when test = "/buildinfo/document/sidebar/@promo = 'none'">
105
+
106
+        <!--otherwise display about-fsfe-->
107
+        </xsl:when><xsl:when test = "not(/buildinfo/document/sidebar/@promo = 'no')">
108
+          <h3 class="promo"><xsl:call-template name="fsfe-gettext">
109
+            <xsl:with-param name="id" select="'about-fsfe'" />
110
+          </xsl:call-template></h3>
111
+          <xsl:call-template name="fsfe-gettext">
112
+            <xsl:with-param name="id" select="'about-fsfe-intro'" />
113
+          </xsl:call-template>
114
+          <a href="/about/about.html" class="learn-more">
115
+            <xsl:call-template name="fsfe-gettext">
116
+            <xsl:with-param name="id" select="'learn-more'" />
117
+          </xsl:call-template></a>
118
+        </xsl:when>
119
+      </xsl:choose>
120
+
121
+    </aside>
119 122
   </xsl:template>
120 123
 
121 124
 </xsl:stylesheet>

+ 28
- 0
look/fsfe.less View File

@@ -391,7 +391,35 @@ img.signatory-logo {
391 391
     margin-right: 10px;
392 392
 }
393 393
 
394
+/* news archive */
394 395
 
396
+.archivenews h3 { line-height: 1.2em; }
397
+
398
+.archivenews p { font-size: 0.9em; }
399
+
400
+ul.archivemeta, ul.archivetaglist {
401
+    color: #999;
402
+    font-size: 0.9em;
403
+    padding-left: 0;
404
+}
405
+
406
+ul.archivemeta li {
407
+    display: inline-block;
408
+    padding: 0 0.15em;
409
+}
410
+
411
+ul.archivetaglist li {
412
+    display: inline-block;
413
+    padding: 0 0.25em;
414
+}
415
+
416
+ul.archivemeta li:first-child {padding-left: 0; }
417
+
418
+ul.archivemeta li a, ul.archivetaglist li a { color: #999; }
419
+
420
+.archiveauthor { margin: 0 0.25em; }
421
+
422
+ul.archivetaglist { margin-left: 6%; }
395 423
 
396 424
 /* donate */
397 425
 

+ 8
- 19
news/news.en.xhtml View File

@@ -4,28 +4,17 @@
4 4
   <head>
5 5
     <title>News Archive – FSFE</title>
6 6
   </head>
7
-  <body>
8
-    <h1>News Archive</h1>
9
-
10
-    <p id="introduction">
11
-      This page collects the regular news stories that FSFE publishes
12
-      about its campaigns and activities.  Join the <a
13
-        href="/press/index.html">press release mailing list</a> or
14
-      subscribe to <a href="/news/news.rss">our RSS feed</a> to keep
15
-      up-to-date on our activites.  <a href="newsletter.html">Monthly
16
-        newsletters</a> are also available. Worldwide Free Software news is
17
-      available from FSFE's <a href="/about/fsfnetwork.html">sister
18
-        organisations</a>.
19
-    </p>
20 7
 
8
+  <body class="article" microformats="h-entry">
9
+    <h1 class="p-name">News</h1>
21 10
     <include-news/>
22 11
   </body>
23 12
 
13
+  <sidebar promo="none">
14
+    <h2><i class="fa fa-rss"></i></h2>
15
+    <p>This page collects the regular news stories that FSFE publishes about its campaigns and activities. <br />Join the <a href="/press/index.html">press release mailing list</a> or subscribe to <a href="/news/news.rss">our RSS feed</a> to keep up-to-date on our activites. <a href="newsletter.html">Monthly newsletters</a> are also available.</p>
16
+  </sidebar>
17
+
24 18
   <text id="more">Read more…</text>
25 19
   <timestamp>$Date$ $Author$</timestamp>
26
-</html>
27
-<!--
28
-Local Variables: ***
29
-mode: xml ***
30
-End: ***
31
--->
20
+</html>

+ 116
- 46
news/news.xsl View File

@@ -1,59 +1,129 @@
1
-<?xml version="1.0" encoding="ISO-8859-1"?>
1
+<?xml version="1.0" encoding="UTF-8"?>
2 2
 
3
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+<xsl:stylesheet version="1.0"
4
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
+                xmlns:dt="http://xsltsl.org/date-time">
4 6
 
5 7
   <xsl:import href="../fsfe.xsl" />
6
-  <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
8
+  <xsl:import href="../tools/xsltsl/date-time.xsl" />
9
+  <xsl:output method="html"
10
+              encoding="utf-8"
11
+              indent="yes"
12
+              doctype-system="about:legacy-compat" />
7 13
 
8
-  <!-- In /html/body node, append dynamic content -->
14
+  <!-- in /html/body node, append dynamic content -->
9 15
   <xsl:template match="/buildinfo/document/body/include-news">
10
-      <!-- First, include what's in the source file -->
11
-      <xsl:apply-templates />
12
-
13
-      <!-- $today = current date (given as <html date="...">) -->
14
-      <xsl:variable name="today">
15
-        <xsl:value-of select="/buildinfo/@date" />
16
-      </xsl:variable>
17
-
18
-      <!-- Show news except those in the future, but no newsletters -->
19
-      <xsl:for-each select="/buildinfo/document/set/news
20
-        [translate (@date, '-', '') &lt;= translate ($today, '-', '') and
21
-         not (@type = 'newsletter')]">
22
-        <xsl:sort select="@date" order="descending" />
23
-
24
-        <!-- This is a news entry -->
25
-        <xsl:element name="p">
26
-
27
-          <!-- Date and title -->
28
-          <xsl:element name="b">
29
-            <xsl:text>(</xsl:text>
30
-            <xsl:value-of select="@date" />
31
-            <xsl:text>) </xsl:text>
32
-            <xsl:value-of select="title" />
33
-          </xsl:element>
34
-          <xsl:element name="br" />
35
-
36
-          <!-- Text -->
37
-          <xsl:apply-templates select="body/node()" />
16
+    <!-- first, include what's in the source file -->
17
+    <xsl:apply-templates />
18
+    <!-- $today = current date (given as <html date="...">) -->
19
+    <xsl:variable name="today">
20
+      <xsl:value-of select="/buildinfo/@date" />
21
+    </xsl:variable>
38 22
 
39
-          <!-- Link -->
40
-          <xsl:apply-templates select="link" />
23
+    <!-- show news except those in the future, but no newsletters -->
24
+    <xsl:for-each select="/buildinfo/document/set/news
25
+                          [translate (@date, '-', '') &lt;= translate ($today, '-', '')
26
+                          and not (@type = 'newsletter')]">
27
+      <xsl:sort select="@date" order="descending" />
41 28
 
42
-        </xsl:element>
43
-        <!-- End news entry -->
29
+      <!-- begin: news entry -->
30
+      <section class="archivenews">
31
+        <!-- title (linked) -->
32
+        <h3><xsl:choose><xsl:when test="link != ''">
33
+            <a href="{link}"><xsl:value-of select="title" /></a>
34
+          </xsl:when><xsl:otherwise>
35
+            <xsl:value-of select="title" />
36
+        </xsl:otherwise></xsl:choose></h3>
37
+        <!-- date and author -->
38
+        <ul class="archivemeta">
39
+          <li> <!-- date -->
40
+            <xsl:value-of select="substring(@date,9,2)" />
41
+            <xsl:text> </xsl:text>
42
+            <xsl:call-template name="dt:get-month-name">
43
+              <xsl:with-param name="month" select="substring(@date,6,2)" />
44
+            </xsl:call-template>
45
+            <xsl:text> </xsl:text>
46
+            <xsl:value-of select="substring(@date,1,4)" />
47
+          </li> <!-- author -->
48
+          <xsl:if test="/buildinfo/document/set/news/author">
49
+            <xsl:apply-templates select="author" />
50
+        </xsl:if></ul>
51
+        <!-- text and read-more-link -->
52
+        <p><xsl:apply-templates select="body/node()" />
53
+        <xsl:apply-templates select="link" /></p>
54
+        <!-- tags -->
55
+        <xsl:if test="/buildinfo/document/set/news/tags/tag
56
+                      [not(. = 'front-page' or @key = 'front-page')]">
57
+          <ul class="archivetaglist"><xsl:apply-templates select="tags" /></ul>
58
+        </xsl:if>
59
+      </section>
60
+      <!-- end: news entry -->
61
+    </xsl:for-each>
62
+  </xsl:template>
44 63
 
45
-      </xsl:for-each>
64
+  <!-- how to display: author -->
65
+  <xsl:template match="buildinfo/document/set/news/author">
66
+    <xsl:variable name="id" select="@id" />
67
+    <xsl:if test="position() = 1">
68
+      <li class="archiveauthor"><xsl:text>&#x2014;</xsl:text></li>
69
+    </xsl:if>
70
+    <li> <!-- if author is in fsfe's people.xml, take information from there -->
71
+      <xsl:choose>
72
+        <!-- author is in people.en.xml -->
73
+        <xsl:when test="@id and document('../about/people/people.en.xml')/personset/person[@id=$id]">
74
+          <xsl:choose>
75
+            <!-- person has a link -->
76
+            <xsl:when test="document('../about/people/people.en.xml')/personset/person[@id=$id]/link">
77
+              <a rel="author" href="{document('../about/people/people.en.xml')/personset/person[@id=$id]/link}">
78
+                <xsl:value-of select="document('../about/people/people.en.xml')/personset/person[@id=$id]/name" />
79
+            </a></xsl:when>
80
+            <!-- person has no link -->
81
+            <xsl:otherwise>
82
+              <span>
83
+                <xsl:value-of select="document('../about/people/people.en.xml')/personset/person[@id=$id]/name" />
84
+            </span></xsl:otherwise></xsl:choose>
85
+        </xsl:when>
86
+        <!-- author is not in people.en.xml -->
87
+        <xsl:otherwise>
88
+          <xsl:choose>
89
+            <!-- person has a link -->
90
+            <xsl:when test="link">
91
+              <a rel="author" href="{link}"><xsl:value-of select="name" /></a>
92
+            </xsl:when>
93
+            <!-- person has no link -->
94
+            <xsl:otherwise>
95
+              <span class="author p-author"><xsl:value-of select="name" />
96
+            </span></xsl:otherwise></xsl:choose>
97
+      </xsl:otherwise></xsl:choose>
98
+      <xsl:if test="not(position() = last())">
99
+        <xsl:text>, </xsl:text>
100
+      </xsl:if>
101
+    </li>
46 102
   </xsl:template>
47 103
 
48
-  <!-- How to show a link -->
104
+  <!-- how to display: read-more-link -->
49 105
   <xsl:template match="/buildinfo/document/set/news/link">
50 106
     <xsl:text>&#160;</xsl:text>
51
-    <xsl:element name="a">
52
-      <xsl:attribute name="href">
53
-        <xsl:value-of select="text()" />
54
-      </xsl:attribute>
55
-      <xsl:attribute name="class">learn-more</xsl:attribute>
56
-        <xsl:value-of select="/buildinfo/document/text[@id='more']" />
57
-    </xsl:element>
107
+    <a class="learn-more" href="{text()}"></a>
108
+  </xsl:template>
109
+
110
+  <!-- how to display: tags -->
111
+  <xsl:template match="buildinfo/document/set/news/tags">
112
+    <xsl:for-each select="tag[not(. = 'front-page' or @key = 'front-page')]">
113
+      <xsl:variable name="keyname"
114
+                    select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
115
+      <xsl:variable name="tagname"
116
+                    select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
117
+      <xsl:choose>
118
+        <xsl:when test="@key and .">
119
+          <li><a href="/tags/tagged-{$keyname}.html"><xsl:value-of select="." /></a></li>
120
+        </xsl:when><xsl:when test="@content and not(@content = '')"><!-- Legacy -->
121
+          <li><a href="/tags/tagged-{$tagname}.html"><xsl:value-of select="@content" /></a></li>
122
+        </xsl:when><xsl:when test="@key"><!-- bad style -->
123
+          <li><a href="/tags/tagged-{$keyname}.html"><xsl:value-of select="@key" /></a></li>
124
+        </xsl:when><xsl:otherwise><!-- Legacy and bad style -->
125
+          <li><a href="/tags/tagged-{$tagname}.html"><xsl:value-of select="." /></a></li>
126
+      </xsl:otherwise></xsl:choose>
127
+    </xsl:for-each>
58 128
   </xsl:template>
59
-</xsl:stylesheet>
129
+</xsl:stylesheet>

+ 44
- 43
news/xhtml2xml.xsl View File

@@ -9,53 +9,54 @@
9 9
   <xsl:template match="/html">
10 10
 
11 11
     <xsl:element name="newsset">
12
-      
13 12
       <xsl:element name="news">
14
-	<xsl:attribute name="date">
15
-	  <xsl:value-of select="/html/@newsdate"/>
16
-	</xsl:attribute>
17
-
18
-	<xsl:if test="/html/@type">
19
-	  <xsl:attribute name ="type">
20
-	    <xsl:value-of select="/html/@type"/>
21
-	  </xsl:attribute>
22
-	</xsl:if>
13
+        
14
+        <xsl:attribute name="date">
15
+          <xsl:value-of select="/html/@newsdate"/>
16
+        </xsl:attribute>
17
+        
18
+        <xsl:if test="/html/@type">
19
+          <xsl:attribute name ="type">
20
+            <xsl:value-of select="/html/@type"/>
21
+          </xsl:attribute>
22
+        </xsl:if>
23 23
 	
24
-	<!-- TODO: to be removed -->
25
-	<xsl:if test="/html/@tags">
26
-	  <xsl:attribute name ="tags">
27
-	    <xsl:value-of select="/html/@tags"/>
28
-	  </xsl:attribute>
29
-	</xsl:if>
30
-
31
-	<xsl:element name="title">
32
-	  <xsl:value-of select="/html/head/title"/>
33
-	</xsl:element>
34
-
35
-	<xsl:element name="body">
36
-	  <xsl:value-of select="/html/body/p[@newsteaser]"/>
37
-	</xsl:element>
24
+        <!-- TODO: to be removed -->
25
+        <xsl:if test="/html/@tags">
26
+          <xsl:attribute name ="tags">
27
+            <xsl:value-of select="/html/@tags"/>
28
+          </xsl:attribute>
29
+        </xsl:if>
30
+
31
+        <xsl:element name="title">
32
+          <xsl:value-of select="/html/head/title"/>
33
+        </xsl:element>
34
+
35
+        <xsl:element name="body">
36
+          <xsl:value-of select="/html/body/p[@newsteaser]"/>
37
+        </xsl:element>
38 38
 	
39
-	<xsl:element name="body-complete">
40
-	  <xsl:copy-of select="/html/body/node()"/>
41
-	</xsl:element>
39
+        <xsl:element name="body-complete">
40
+          <xsl:copy-of select="/html/body/node()"/>
41
+        </xsl:element>
42 42
 	
43
-	<xsl:element name="link">
44
-	  <xsl:variable name="the_link">
45
-	    <xsl:value-of select="/html/@link"/>
46
-	  </xsl:variable>
47
-	  <xsl:choose>
48
-	    <xsl:when test="not(string($the_link))">
49
-	      <xsl:value-of select="$link"/>
50
-	    </xsl:when>
51
-	    <xsl:otherwise>
52
-	      <xsl:value-of select="$the_link"/>
53
-	    </xsl:otherwise>
54
-	  </xsl:choose>
55
-	</xsl:element>
56
-	
57
-	<xsl:copy-of select="/html/tags" />
58
-
43
+        <xsl:element name="link">
44
+          <xsl:variable name="the_link">
45
+            <xsl:value-of select="/html/@link"/>
46
+          </xsl:variable>
47
+          <xsl:choose>
48
+            <xsl:when test="not(string($the_link))">
49
+              <xsl:value-of select="$link"/>
50
+            </xsl:when>
51
+            <xsl:otherwise>
52
+              <xsl:value-of select="$the_link"/>
53
+            </xsl:otherwise>
54
+          </xsl:choose>
55
+        </xsl:element>
56
+        
57
+        <xsl:copy-of select="/html/tags" />
58
+        <xsl:copy-of select="/html/author" />
59
+      
59 60
       </xsl:element>
60 61
     </xsl:element>
61 62
   </xsl:template>

Loading…
Cancel
Save