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>
|
---|
20 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
---|
21 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
22 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
23 |
|
---|
24 | SELECT (?selected_year AS ?Year) (?country AS ?Country) (?title AS ?Title) (GROUP_CONCAT(?creator; SEPARATOR="; ") AS ?Artist)
|
---|
25 | WHERE {
|
---|
26 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
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 > 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 | }
|
---|
56 | GROUP BY ?selected_year ?country ?title
|
---|
57 | ORDER BY ?selected_year ?country
|
---|
58 | </xsl:text>
|
---|
59 | </div>
|
---|
60 | <div id="ssv-list-of-losers-chart" style="display: none;">
|
---|
61 | <!-- -->
|
---|
62 | <xsl:text>
|
---|
63 | sgvizler.visualization.Table
|
---|
64 | </xsl:text>
|
---|
65 | </div>
|
---|
66 | <div id="ssv-list-of-losers-chart-options" style="display: none;">
|
---|
67 | <!-- -->
|
---|
68 | <xsl:text>
|
---|
69 | title=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 |
|
---|