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-draw-bias-normalized">
|
---|
12 |
|
---|
13 |
|
---|
14 | <div id="ssv-draw-bias-normalized" style="display: none;">
|
---|
15 |
|
---|
16 | <!-- Determine if their is any bias in the position in the competition for where you perform in the lineup -->
|
---|
17 | <xsl:text>
|
---|
18 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
---|
19 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
20 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
21 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
22 |
|
---|
23 | SELECT ?draw_int ?normFreqCount WHERE {
|
---|
24 | SELECT ?draw_int (SUM(?is_winner) AS ?freqCount) (COUNT(?is_winner) AS ?maxPossibleFreqCount) (100.0 * ?freqCount/?maxPossibleFreqCount AS ?normFreqCount)
|
---|
25 | WHERE {
|
---|
26 | GRAPH <http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>> {
|
---|
27 | ?esc_entrant_uri dc:Relation.isPartOf <http://127.0.0.1:8383/greenstone3/library/collection/</xsl:text><xsl:value-of select="$collName"/><xsl:text>>.
|
---|
28 |
|
---|
29 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
30 | ?esc_entrant_uri gsdlextracted:Draw ?draw.
|
---|
31 | ?esc_entrant_uri gsdlextracted:Place ?place.
|
---|
32 |
|
---|
33 | BIND(xsd:integer(?draw) AS ?draw_int).
|
---|
34 | BIND(xsd:integer(?place) AS ?place_int).
|
---|
35 |
|
---|
36 | BIND(IF(?place_int = 1,1,0) AS ?is_winner).
|
---|
37 | }
|
---|
38 | }
|
---|
39 | GROUP BY ?draw_int ORDER BY ASC(?draw_int)
|
---|
40 | }
|
---|
41 | ORDER BY ASC(?draw_int)
|
---|
42 | </xsl:text>
|
---|
43 | </div>
|
---|
44 | <div id="ssv-draw-bias-normalized-chart" style="display: none;">
|
---|
45 | <!-- -->
|
---|
46 | <xsl:text>
|
---|
47 | google.visualization.BarChart
|
---|
48 | </xsl:text>
|
---|
49 | </div>
|
---|
50 | <div id="ssv-draw-bias-normalized-chart-options" style="display: none;">
|
---|
51 | <!-- -->
|
---|
52 | <xsl:text>
|
---|
53 | title=Number times an entry has has won given their draw position in the performance lineup|legend.position=none|height=400|chartArea.height=340|fontSize=11
|
---|
54 | </xsl:text>
|
---|
55 | </div>
|
---|
56 |
|
---|
57 | <div id="ssv-draw-bias-normalized-div-style" style="display: none;">
|
---|
58 | <!-- -->
|
---|
59 | <xsl:text>
|
---|
60 | width:900px; height:400px; 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 |
|
---|