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