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-voting-dataflow-jury">
|
---|
12 |
|
---|
13 | <div id="ssv-voting-dataflow-jury" style="display: none;">
|
---|
14 |
|
---|
15 | <!-- Dataflow voting patterns (Sankey) -->
|
---|
16 | <xsl:text>
|
---|
17 |
|
---|
18 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
19 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
20 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
21 |
|
---|
22 | SELECT (?jury_country AS ?jury_vote_from_country) (?country AS ?to_country) (SUM(?jury_vote_int) * SUM(?jury_vote_int) AS ?country_jury_to_country_total_squared) (SUM(?jury_vote_int) AS ?jury_vote_total) WHERE {
|
---|
23 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
24 | # ?esc_entrant_uri dc:Relation.isPartOf <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>>.
|
---|
25 |
|
---|
26 | ?esc_entrant_uri ?gsdlextracted_jury_country_uri ?jury_vote.
|
---|
27 | BIND(STRENDS(str(?gsdlextracted_jury_country_uri),"-J") AS ?is_jury_vote)
|
---|
28 | FILTER (?is_jury_vote).
|
---|
29 | BIND(REPLACE(str(?gsdlextracted_jury_country_uri), ".*#(.*?)-J$", "$1-J") AS ?jury_country).
|
---|
30 |
|
---|
31 | BIND(xsd:integer(?jury_vote) AS ?jury_vote_int).
|
---|
32 |
|
---|
33 | ?esc_entrant_uri gsdlextracted:Year ?year
|
---|
34 | FILTER(xsd:integer(?year) >= **startyear** && xsd:integer(?year) <= **endyear**).
|
---|
35 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
36 |
|
---|
37 |
|
---|
38 | }
|
---|
39 | }
|
---|
40 | GROUP BY ?jury_country ?country
|
---|
41 |
|
---|
42 |
|
---|
43 | </xsl:text>
|
---|
44 | </div>
|
---|
45 | <div id="ssv-voting-dataflow-jury-chart" style="display: none;">
|
---|
46 | <!-- -->
|
---|
47 | <xsl:text>
|
---|
48 | google.visualization.Sankey
|
---|
49 | </xsl:text>
|
---|
50 | </div>
|
---|
51 | <div id="ssv-voting-dataflow-jury-chart-options" style="display: none;">
|
---|
52 | <!-- -->
|
---|
53 | <xsl:text>
|
---|
54 | title=Dataflow Analysis of Country Juries to Country Entrants (2010-2019)|height=1200|chartArea.height=1100|fontSize=11
|
---|
55 | </xsl:text>
|
---|
56 | </div>
|
---|
57 | <div id="ssv-voting-dataflow-jury-div-style" style="display: none;">
|
---|
58 | <!-- -->
|
---|
59 | <xsl:text>
|
---|
60 | width:900px; height:1200px; margin-left: auto; margin-right: auto; overflow-y: hidden; overflow-x: hidden;
|
---|
61 | </xsl:text>
|
---|
62 |
|
---|
63 | </div>
|
---|
64 |
|
---|
65 | </xsl:template>
|
---|
66 |
|
---|
67 | </xsl:stylesheet>
|
---|
68 |
|
---|