-
Notifications
You must be signed in to change notification settings - Fork 10
/
queries.xsl
214 lines (199 loc) · 8.65 KB
/
queries.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://dublincore.org/documents/dcmi-namespace/"
xmlns:aqd="http://aurora-network.global/queries/namespace/"
exclude-result-prefixes="xsl aqd dc">
<xsl:template match="/">
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- The above 3 meta tags *must* come first in the head; any other head
content must come *after* these tags -->
<meta name="description" content=""/>
<meta name="author" content=""/>
<!-- <link rel="icon" href="img/favicon.ico" /> -->
<title>Search Queries for "Mapping Research Output to the Sustainable Development Goals (SDGs)"</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
crossorigin="anonymous"></link>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
crossorigin="anonymous" ></script>-->
<script src="https://kit.fontawesome.com/903201d2a3.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="jumbotron">
<div class="container">
<h1><i class="fas fa-university"></i> Aurora SDG Search Queries <i class="fas fa-search"></i></h1>
<h2> Search Queries for "Mapping Research Output to the Sustainable Development Goals (SDGs)" </h2>
<p> <i class="fas fa-arrow-left"></i> <a href="https://aurora-network-global.github.io/sdg-queries/"> Back to other SDG Queries</a> </p>
<p> <i class="fab fa-github"></i> <a href="https://github.com/Aurora-Network-Global/sdg-queries" target="_blank"> Contribute to this SDG Query on Github </a> </p>
<p> <i class="fas home"></i> <a href="https://aurora-universities.eu/sdg-research/" target="_blank"> Project home: Aurora SDG Research Dashboard </a> </p>
</div>
</div>
<div class="container">
<xsl:apply-templates select="aqd:query"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="aqd:queries">
<xsl:apply-templates select="aqd:query"/>
</xsl:template>
<xsl:template match="aqd:query">
<div style="display:table">
<div style="display:table-cell"><img src="{icon}" height="100px"/></div>
<div style="display:table-cell"><a href="{dc:subject}"><h2><xsl:value-of select="dc:title/."/> </h2></a> </div>
</div>
<p><xsl:value-of select="dc:description"/></p>
<p>Version: <strong><xsl:value-of select="dc:identifier[@type='version']" /></strong> | doi:<xsl:value-of select="dc:identifier[@type='doi']" /></p>
<p>Last updated: <xsl:value-of select="dc:date"/> </p>
<p>Created by: <xsl:value-of select="dc:creator" /></p>
<p>License: <xsl:value-of select="dc:rights" /> | <xsl:value-of select="dc:rights/@href" /> </p>
<p>Usage: Go to <a href="https://scopus.com">www.scopus.com</a> , and copy-paste the search queries in "Advanced Search". For the combined search string, scroll to bottom. </p>
<xsl:apply-templates select="aqd:query-definitions"/>
</xsl:template>
<xsl:template match="aqd:query-definitions">
<table class="table table-striped" border="1">
<thead>
<tr bgcolor="#9acd32">
<th>Target</th>
<th>Description</th>
<th>Query</th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td/>
<td>
(
</td>
</tr>
<xsl:apply-templates select="aqd:query-definition" mode="table"/>
<tr>
<td/>
<td/>
<td>
)
</td>
</tr>
<tr>
<td></td>
<td>Filter:</td>
<td>
<xsl:apply-templates select="aqd:filters"/>
</td>
</tr>
</tbody>
</table>
<hr/>
<div>
(<xsl:apply-templates select="aqd:query-definition" mode="query"/>)
<xsl:apply-templates select="aqd:filters"/>
</div>
</xsl:template>
<xsl:template match="aqd:query-definition" mode="table">
<tr>
<td>
<xsl:value-of select="../../dc:identifier"/>.
<xsl:value-of select="aqd:subquery-identifier"/>
</td>
<td>
<xsl:apply-templates select="aqd:subquery-descriptions"/>
</td>
<td>
<xsl:if test="count(aqd:query-lines/aqd:query-line) > 0">
<xsl:if test="aqd:query-lines/aqd:query-line/. != ''">
<xsl:if test="position() != 1">
<xsl:text> OR </xsl:text>
</xsl:if>
<xsl:apply-templates select="aqd:query-lines"/>
<xsl:apply-templates select="aqd:filters"/>
</xsl:if>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="aqd:query-definition" mode="query">
<xsl:if test="count(aqd:query-lines/aqd:query-line) > 0">
<xsl:if test="aqd:query-lines/aqd:query-line/. != ''">
<xsl:if test="position() != 1">
<xsl:text> OR </xsl:text>
</xsl:if>
<xsl:apply-templates select="aqd:query-lines"/>
<xsl:apply-templates select="aqd:filters"/>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="aqd:subquery-descriptions">
<xsl:apply-templates select="aqd:subquery-description"/>
</xsl:template>
<xsl:template match="aqd:subquery-description">
<p>
<xsl:value-of select="."/>
</p>
</xsl:template>
<xsl:template match="aqd:query-lines">
<font face="Courier, monospace">
<xsl:if test="@field">
<xsl:value-of select="@field"/>(
</xsl:if>
<xsl:apply-templates select="aqd:query-line"/>
<xsl:if test="@field">
)
</xsl:if>
</font>
</xsl:template>
<xsl:template match="aqd:query-line">
<p>
<font face="Courier, monospace">
<xsl:if test="@field">
<xsl:value-of select="@field"/>
</xsl:if>
(<xsl:value-of select="."/>)
<xsl:if test="position() != last()">
<xsl:text> OR </xsl:text>
<xsl:text>
</xsl:text>
</xsl:if>
</font>
</p>
</xsl:template>
<xsl:template match="aqd:filters">
<xsl:if test="aqd:timerange">
<p>
<font face="Courier, monospace">
AND (
<xsl:value-of select="aqd:timerange/@field"/>
>
<xsl:value-of select="aqd:timerange/aqd:start/."/>
AND
<xsl:value-of select="aqd:timerange/@field"/>
<
<xsl:value-of select="aqd:timerange/aqd:end/."/>
)
</font>
</p>
</xsl:if>
<xsl:if test="aqd:filter">
<xsl:if test="aqd:filter !=''">
<font face="Courier, monospace">
<xsl:if test="position() != last()">
AND
</xsl:if>
<p>
(<xsl:apply-templates select="aqd:filter"/>)
</p>
</font>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="aqd:filter">
<font face="Courier, monospace">
<xsl:value-of select="@field"/>(<xsl:value-of select="."/>)
</font>
</xsl:template>
</xsl:stylesheet>