source: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/list-of-losers.xsl@ 35107

Last change on this file since 35107 was 35096, checked in by davidb, 3 years ago

Year filter added in to remove 1956 entries, where not much is know about the voting, other than who won

File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 xmlns:gslib="http://www.greenstone.org/skinning"
7 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util">
10
11 <xsl:template name="ssv-list-of-losers">
12
13
14
15
16 <div id="ssv-list-of-losers" style="display: none;">
17
18<!-- List of entrants that came last in a given year -->
19<xsl:text>
20PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
21PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
22PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
23
24SELECT (?selected_year AS ?Year) (?country AS ?Country) (?title AS ?Title) (GROUP_CONCAT(?creator; SEPARATOR="; ") AS ?Artist)
25WHERE {
26 GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt; {
27
28 {
29 SELECT ?selected_year (MAX(?selected_place_int) AS ?max_selected_place_int)
30 WHERE {
31
32 ?esc_entrant_uri gsdlextracted:Country ?selected_country.
33 ?esc_entrant_uri gsdlextracted:Year ?selected_year.
34
35 BIND(xsd:integer(?selected_year) AS ?selected_year_int).
36 FILTER(?selected_year_int &gt; 1956).
37
38 ?esc_entrant_uri gsdlextracted:Place ?selected_place.
39 BIND(xsd:integer(?selected_place) AS ?selected_place_int).
40
41 }
42 GROUP BY ?selected_year
43 ORDER BY ?selected_year
44 }
45
46 ?esc_entrant_uri gsdlextracted:Country ?country.
47 ?esc_entrant_uri gsdlextracted:Place ?place.
48 BIND(xsd:integer(?place) AS ?place_int).
49 FILTER(?place_int = ?max_selected_place_int).
50
51 ?esc_entrant_uri gsdlextracted:Year ?selected_year.
52 ?esc_entrant_uri gsdlextracted:Title ?title.
53 ?esc_entrant_uri gsdlextracted:Creator ?creator.
54 }
55}
56GROUP BY ?selected_year ?country ?title
57ORDER BY ?selected_year ?country
58</xsl:text>
59 </div>
60 <div id="ssv-list-of-losers-chart" style="display: none;">
61<!-- -->
62<xsl:text>
63sgvizler.visualization.Table
64</xsl:text>
65 </div>
66 <div id="ssv-list-of-losers-chart-options" style="display: none;">
67<!-- -->
68<xsl:text>
69title=Last Place Through the Ages|height=800|width=700|fontSize=11
70</xsl:text>
71 </div>
72
73 <div id="ssv-list-of-losers-div-style" style="display: none;">
74<!-- -->
75<xsl:text>
76 width:710px; height:400px; margin-left: auto; margin-right: auto; overflow-y: scroll; overflow-x: hidden;
77 color: black; background-color: white;
78</xsl:text>
79
80<!--
81.table-striped tbody tr:nth-of-type(2n+1) {
82 background-color: rgba(0,0,0,.05);
83}
84-->
85 </div>
86
87 </xsl:template>
88
89</xsl:stylesheet>
90
91
92
93
Note: See TracBrowser for help on using the repository browser.