Ignore:
Timestamp:
2021-04-22T14:50:00+12:00 (3 years ago)
Author:
davidb
Message:

General text update; auto-focus param added into ssv_execute()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl

    r35061 r35093  
    4848      <gsf:style src="sites/{$site_name}/collect/{$collName}/css/dataviz.css" />
    4949      <style>
    50         div          { padding-left: 12px; padding-right: 12px; padding-top: 6px; padding-bottom: 6px;}
    51         div.showmore { padding-left:  0px; padding-right:  0px; padding-top: 0px; padding-bottom: 0px;}
    52 
    53         p  { padding-top: 6px; padding-bottom: 6px;}
    54         a  { text-decoration: underline; }
    55         li { padding-bottom: 6px; margin-bottom: 6px; }
     50        #gs_content div          { padding-left: 12px; padding-right: 12px; padding-top: 6px; padding-bottom: 6px;}
     51        #gs_content div.showmore { padding-left:  0px; padding-right:  0px; padding-top: 0px; padding-bottom: 0px;}
     52
     53        #gs_content p  { padding-top: 6px; padding-bottom: 6px;}
     54        #gs_content a  { text-decoration: underline; }
     55        #gs_content li { padding-bottom: 6px; margin-bottom: 6px; }
    5656      </style>
    5757
     
    389389
    390390
     391        <div id="ssq-from-winning-to-losing" style="display: none;">
     392<!-- -->
     393<xsl:text>
     394       
     395PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
     396PREFIX xsd:  &lt;http://www.w3.org/2001/XMLSchema#&gt;
     397PREFIX dc:   &lt;http://purl.org/dc/elements/1.1/&gt;
     398PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
     399
     400SELECT (?country as ?Country) (?year AS ?WinningYear) (?total as ?WinningGrandTotal) (?next_year AS ?LosingYear) (?next_total as ?LosingGrandTotal)         
     401WHERE {
     402    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     403        ?esc_entrant_uri gsdlextracted:Country ?country.
     404        ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
     405
     406    ?esc_entrant_uri gsdlextracted:Place ?place.
     407        BIND(xsd:integer(?place) AS ?place_int).   
     408    FILTER(?place_int = 1).
     409
     410    ?esc_entrant_uri gsdlextracted:Year ?year.
     411    BIND(xsd:integer(?year) AS ?year_int).
     412    BIND(?year_int + 1 AS ?next_year_int).
     413    BIND(str(?next_year_int) AS ?next_year).
     414
     415        ?next_esc_entrant_uri gsdlextracted:Country ?country.
     416    ?next_esc_entrant_uri gsdlextracted:Year ?next_year.
     417   
     418        ?next_esc_entrant_uri gsdlextracted:VoteGrandTotal ?next_total.
     419
     420        ?next_esc_entrant_uri gsdlextracted:ReverseFinishingPos ?rev_finishing_pos.
     421        BIND(xsd:integer(?rev_finishing_pos) AS ?rev_finishing_pos_int).
     422        FILTER(?rev_finishing_pos_int = 1).
     423   
     424   
     425   }
     426}
     427ORDER BY ?country
     428</xsl:text>
     429        </div>
    391430
    392431        <div id="ssq-country-info" style="display: none;">
     
    528567
    529568        <p>
    530           The number of times a country has won Eurovision across the years.  The includes
    531           the years when only Juries voted (1956-2000) through to the introduction
    532           of Televotes, where a variety of forms have been used such as only
    533           Televotes, a pre-combined score based on Televotes and Jury votes, to
    534           (from 2016 onwards) where the Jury and Tele votes are explicitly
    535           given individually per country, then combined.
     569          The number of times a country has won Eurovision
     570          across the years.  The includes the years when only
     571          Juries voted (1956-2000) through to the introduction
     572          of Televotes, where a variety of forms have been
     573          used such as only Televotes, a pre-combined score
     574          based on Televotes and Jury votes, to (from 2016
     575          onwards) where the Jury and Tele votes are
     576          explicitly given individually per country, then
     577          combined.
    536578        </p>
    537579          </li>
    538          
     580
     581
     582
     583          <li>
     584        <b>From Hero to Zero!</b><br/>
     585        <button type="button" class="load-ssq" id="load-ssq-from-winning-to-losing" onclick="ssq_load('ssq-from-winning-to-losing')">Load query above</button>
     586        <button type="button" class="exec-ssq" id="exec-ssq-from-winning-to-losing" onclick="ssq_execute()">Get Results</button><br/>
     587
     588        <p>
     589          List countries where, having won in one year, they
     590          have gone on to lose with the lowest score of the
     591          contest the following year.  Note this definition
     592          doesn't quite meet the given heading of <i>From Here
     593          to Zero</i>. There is in fact only one country, to
     594          date, where this has happened (nul-point the
     595          following year).  View the table to see who it is
     596          ...  then why not test out your SPARQL querying
     597          skills and see if you can modify the query used so
     598          it only returns the Hero to Zero case?
     599        </p>
     600          </li>
    539601
    540602          <li>
Note: See TracChangeset for help on using the changeset viewer.