source: main/trunk/model-sites-dev/von-sparql/transform/pages/home.xsl@ 28688

Last change on this file since 28688 was 28688, checked in by davidb, 10 years ago

Example visualization added to home page of this site

File size: 2.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
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 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util">
9
10
11 <xsl:template name="von-sparql-canvas">
12
13 <script type="text/javascript" src="ext/jena/sgvizler/jquery-1.6.2.min.js"><xsl:text> </xsl:text></script>
14
15 <script type="text/javascript" src="ext/jena/sgvizler/jsapi"><xsl:text> </xsl:text></script>
16 <script type="text/javascript" id="sgvzlr_script" src="ext/jena/sgvizler/sgvizler.js"><xsl:text> </xsl:text></script>
17
18
19 <script type="text/javascript">
20 <xsl:text disable-output-escaping="yes">
21 sgvizler.option.namespace.mo ='http://purl.org/ontology/mo/';
22 sgvizler.option.namespace.salami = 'http://nema.lis.illinois.edu/salamiEndpoint/';
23
24 sgvizler.option.namespace.salami = 'http://nema.lis.illinois.edu/salamiEndpoint/';
25
26 sgvizler.option.namespace.dc = 'http://purl.org/dc/elements/1.1/';
27 sgvizler.option.namespace.gsembedded = 'http://greenstone.org/gsembedded#'
28 sgvizler.option.namespace.greenstonedata = 'http://localhost:3030/greenstone/data/'
29 $(document).ready(sgvizler.go());
30 </xsl:text>
31 </script>
32
33
34<div id="sgvzl_example1"
35 data-sgvizler-endpoint="http://localhost:3030/greenstone/query"
36
37 data-sgvizler-chart="gPieChart"
38 data-sgvizler-loglevel="2"
39 data-sgvizler-chart-options="title=Items by Language"
40 style="width:900px; height:400px; margin-left: auto; margin-right: auto">
41 <xsl:attribute name="data-sgvizler-query">
42 SELECT (?langTag) (COUNT(?langTag) AS ?freqCount)
43 WHERE {
44 GRAPH &lt;http://localhost:3030/greenstone/data/hathitrust-tab&gt; {
45 ?s &lt;http://purl.org/dc/elements/1.1/Language&gt; ?langTag .
46 }
47 }
48 GROUP BY ?langTag
49 </xsl:attribute>
50</div>
51
52
53
54
55 </xsl:template>
56
57 <!-- the page content -->
58 <xsl:template match="/page/pageResponse">
59
60 <div id="quickSearch">
61 <gslib:crossCollectionQuickSearchForm/>
62 </div>
63
64 <h2><gslib:selectACollectionTextBar/></h2>
65
66 <div id="collectionLinks">
67 <xsl:if test="count(collectionList/collection) = 0">
68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.no_collections')"/>
69 <br/>
70 </xsl:if>
71 <xsl:for-each select="collectionList/collection">
72 <gslib:collectionLinkWithImage/>
73 </xsl:for-each>
74 <br class="clear"/>
75 </div>
76
77 <xsl:call-template name="von-sparql-canvas"/>
78
79 <gslib:serviceClusterList/>
80
81 <xsl:for-each select="serviceList/service[@type='query']">
82 <gslib:serviceLink/><br/>
83 </xsl:for-each>
84
85 <xsl:for-each select="serviceList/service[@type='authen']">
86 <gslib:authenticationLink/><br/><br/>
87 <gslib:registerLink/><br/>
88 </xsl:for-each>
89
90 </xsl:template>
91
92</xsl:stylesheet>
93
94
Note: See TracBrowser for help on using the repository browser.