Revision 31768
Added by Andrea Mannocci about 10 years ago
modules/dnet-modular-lightui-ui/trunk/src/main/resources/eu/dnetlib/functionality/modular/ui/xslt/emf_2_row.xslt | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="2.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
6 |
|
|
7 |
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<xsl:variable name="id" select="//*[local-name() = 'objIdentifier']" /> |
|
11 |
<xsl:variable name="type" select="//*[local-name() = 'entityType' ]" /> |
|
12 |
<xsl:variable name="url" select="//*[local-name() = 'url' ]" /> |
|
13 |
|
|
14 |
<div class="well"> |
|
15 |
<table> |
|
16 |
<tr> |
|
17 |
<td style="width: 120px"> |
|
18 |
<xsl:choose> |
|
19 |
<xsl:when test="$type = 'artifact'"> |
|
20 |
<img src="../resources/img/eagle/artifact.png" width="80" height="80" /> |
|
21 |
</xsl:when> |
|
22 |
<xsl:when test="$type = 'documental'"> |
|
23 |
<img src="../resources/img/eagle/doc.png" width="80" height="80" /> |
|
24 |
</xsl:when> |
|
25 |
<xsl:when test="$type = 'visual'"> |
|
26 |
<img src="../resources/img/eagle/pic.png" width="80" height="80" /> |
|
27 |
</xsl:when> |
|
28 |
</xsl:choose> |
|
29 |
</td> |
|
30 |
<td> |
|
31 |
<strong>Title: </strong><xsl:value-of select="//*[local-name()='title']" /><br/> |
|
32 |
<strong>Entity type: </strong><xsl:value-of select="$type" /><br/> |
|
33 |
<strong>Description: </strong><i><xsl:value-of select="//*[local-name()='description']" /></i><br/> |
|
34 |
<xsl:if test="$url"> |
|
35 |
<br/><b>Image at: </b> |
|
36 |
<a href="{$url}"><xsl:value-of select="$url" /></a><br /> |
|
37 |
</xsl:if> |
|
38 |
<br /> |
|
39 |
<button class="btn btn-primary btn-sm" ng-click="getDocument('objidentifier', '{$id}')">show record</button> |
|
40 |
</td> |
|
41 |
</tr> |
|
42 |
</table> |
|
43 |
</div> |
|
44 |
</xsl:template> |
|
45 |
|
|
46 |
</xsl:stylesheet> |
modules/dnet-modular-lightui-ui/trunk/src/main/resources/eu/dnetlib/functionality/modular/ui/xslt/emf_2_document.xslt | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="2.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
6 |
|
|
7 |
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<div class="row"> |
|
11 |
<div class="col-xs-2"> |
|
12 |
<xsl:variable name="type" select="//*[local-name()='entityType']" /> |
|
13 |
<xsl:choose> |
|
14 |
<xsl:when test="$type = 'artifact'"> |
|
15 |
<img src="../resources/img/eagle/artifact.png" width="80" height="80" /> |
|
16 |
</xsl:when> |
|
17 |
<xsl:when test="$type = 'documental'"> |
|
18 |
<img src="../resources/img/eagle/doc.png" width="80" height="80" /> |
|
19 |
</xsl:when> |
|
20 |
<xsl:when test="$type = 'visual'"> |
|
21 |
<img src="../resources/img/eagle/pic.png" width="80" height="80" /> |
|
22 |
</xsl:when> |
|
23 |
</xsl:choose> |
|
24 |
</div> |
|
25 |
<div class="col-xs-10"> |
|
26 |
<xsl:if test="//*[local-name()='title']"> |
|
27 |
<h1 id="overview" ><xsl:value-of select="//*[local-name()='title']" /></h1> |
|
28 |
</xsl:if> |
|
29 |
</div> |
|
30 |
</div> |
|
31 |
|
|
32 |
<div class="row"> |
|
33 |
<div class="col-xs-12"> |
|
34 |
<h6><span class="glyphicon glyphicon-align-left" /> GENERAL INFORMATION</h6> |
|
35 |
<table class="table"> |
|
36 |
<tbody> |
|
37 |
<tr> |
|
38 |
<td class="col-xs-3"><strong>Title</strong></td> |
|
39 |
<td><xsl:value-of select="//*[local-name()='title']" /></td> |
|
40 |
</tr> |
|
41 |
<tr> |
|
42 |
<td class="col-xs-3"><strong>Description</strong></td> |
|
43 |
<td><xsl:value-of select="//*[local-name()='description']" /></td> |
|
44 |
</tr> |
|
45 |
<tr> |
|
46 |
<td class="col-xs-3"><strong>Provided by</strong></td> |
|
47 |
<td><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@providerName" /></td> |
|
48 |
</tr> |
|
49 |
<tr> |
|
50 |
<td class="col-xs-3"><strong>Landing page</strong></td> |
|
51 |
<td><a href="{//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@landingPage}"><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@landingPage" /></a><span class="label label-warning">This HAS to resolve on a valid page!</span></td> |
|
52 |
</tr> |
|
53 |
<tr> |
|
54 |
<td class="col-xs-3"><strong>Local identifier (a.k.a. CP-ID)</strong></td> |
|
55 |
<td><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']" /><span class="label label-warning">This MUST be an ID, not an URL!</span></td> |
|
56 |
</tr> |
|
57 |
<tr> |
|
58 |
<td class="col-xs-3"><strong>Last edit</strong></td> |
|
59 |
<td><xsl:value-of select="//*[local-name()='dateEdited']" /></td> |
|
60 |
</tr> |
|
61 |
<tr> |
|
62 |
<td class="col-xs-3"><strong>Edited by</strong></td> |
|
63 |
<td><xsl:value-of select="//*[local-name()='metadataEditor']" /></td> |
|
64 |
</tr> |
|
65 |
<tr> |
|
66 |
<td class="col-xs-3"><strong>Collected on</strong></td> |
|
67 |
<td><xsl:value-of select="//*[local-name()='dateOfCollection']" /></td> |
|
68 |
</tr> |
|
69 |
</tbody> |
|
70 |
</table> |
|
71 |
|
|
72 |
<xsl:variable name="type" select="//*[local-name()='entityType']" /> |
|
73 |
<xsl:choose> |
|
74 |
<xsl:when test="$type = 'artifact'"> |
|
75 |
<h6><span class="glyphicon glyphicon-tower" /> ARTIFACT DETAILS</h6> |
|
76 |
<table class="table"> |
|
77 |
<tbody> |
|
78 |
<tr> |
|
79 |
<td class="col-xs-3"><strong>Object type</strong></td> |
|
80 |
<td> |
|
81 |
<xsl:value-of select="//*[local-name()='objectType']" /> |
|
82 |
<xsl:if test="//*[local-name()='objectType']/@uri != ''"> |
|
83 |
<a href="{//*[local-name()='objectType']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
84 |
</xsl:if> |
|
85 |
</td> |
|
86 |
</tr> |
|
87 |
<tr> |
|
88 |
<td class="col-xs-3"><strong>Material</strong></td> |
|
89 |
<td> |
|
90 |
<xsl:value-of select="//*[local-name()='material']" /> |
|
91 |
<xsl:if test="//*[local-name()='material']/@uri != ''"> |
|
92 |
<a href="{//*[local-name()='material']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
93 |
</xsl:if> |
|
94 |
</td> |
|
95 |
</tr> |
|
96 |
<tr> |
|
97 |
<td class="col-xs-3"><strong>Dimensions</strong></td> |
|
98 |
<td><xsl:call-template name="threedimensions"> |
|
99 |
<xsl:with-param name="w" select="//*[local-name()='dimensions']/*[local-name()='width']"/> |
|
100 |
<xsl:with-param name="h" select="//*[local-name()='dimensions']/*[local-name()='height']"/> |
|
101 |
<xsl:with-param name="d" select="//*[local-name()='dimensions']/*[local-name()='depth']"/> |
|
102 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
103 |
</xsl:call-template></td> |
|
104 |
</tr> |
|
105 |
<tr> |
|
106 |
<td class="col-xs-3"><strong>Decoration</strong></td> |
|
107 |
<td> |
|
108 |
<xsl:value-of select="//*[local-name()='decoration']" /> |
|
109 |
<xsl:if test="//*[local-name()='decoration']/@uri != ''"> |
|
110 |
<a href="{//*[local-name()='decoration']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
111 |
</xsl:if> |
|
112 |
</td> |
|
113 |
</tr> |
|
114 |
<tr> |
|
115 |
<td class="col-xs-3"><strong>Places</strong></td> |
|
116 |
<td> |
|
117 |
<table class="table" style="background-color: transparent;"> |
|
118 |
<tbody> |
|
119 |
<tr> |
|
120 |
<td class="col-xs-3"><strong>Roman province italic region</strong></td> |
|
121 |
<td> |
|
122 |
<xsl:value-of select="//*[local-name()='romanProvinceItalicRegion']" /> |
|
123 |
<xsl:if test="//*[local-name()='romanProvinceItalicRegion']/@uri != ''"> |
|
124 |
<a href="{//*[local-name()='romanProvinceItalicRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
125 |
</xsl:if> |
|
126 |
</td> |
|
127 |
</tr> |
|
128 |
<tr> |
|
129 |
<td class="col-xs-3"><strong>Ancient find spot</strong></td> |
|
130 |
<td> |
|
131 |
<xsl:value-of select="//*[local-name()='ancientFindSpot']" /> |
|
132 |
<xsl:if test="//*[local-name()='ancientFindSpot']/@uri != ''"> |
|
133 |
<a href="{//*[local-name()='ancientFindSpot']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
134 |
</xsl:if> |
|
135 |
</td> |
|
136 |
</tr> |
|
137 |
<tr> |
|
138 |
<td class="col-xs-3"><strong>Modern find spot</strong></td> |
|
139 |
<td> |
|
140 |
<xsl:value-of select="//*[local-name()='modernFindSpot']" /> |
|
141 |
<xsl:if test="//*[local-name()='modernFindSpot']/@uri != ''"> |
|
142 |
<a href="{//*[local-name()='modernFindSpot']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
143 |
</xsl:if> |
|
144 |
</td> |
|
145 |
</tr> |
|
146 |
<tr> |
|
147 |
<td class="col-xs-3"><strong>Modern country</strong></td> |
|
148 |
<td> |
|
149 |
<xsl:value-of select="//*[local-name()='modernCountry']" /> |
|
150 |
<xsl:if test="//*[local-name()='modernCountry']/@uri != ''"> |
|
151 |
<a href="{//*[local-name()='modernCountry']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
152 |
</xsl:if> |
|
153 |
</td> |
|
154 |
</tr> |
|
155 |
<tr> |
|
156 |
<td class="col-xs-3"><strong>Modern province</strong></td> |
|
157 |
<td> |
|
158 |
<xsl:value-of select="//*[local-name()='modernProvince']" /> |
|
159 |
<xsl:if test="//*[local-name()='modernProvince']/@uri != ''"> |
|
160 |
<a href="{//*[local-name()='modernProvince']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
161 |
</xsl:if> |
|
162 |
</td> |
|
163 |
</tr> |
|
164 |
<tr> |
|
165 |
<td class="col-xs-3"><strong>Modern region</strong></td> |
|
166 |
<td> |
|
167 |
<xsl:value-of select="//*[local-name()='modernRegion']" /> |
|
168 |
<xsl:if test="//*[local-name()='modernRegion']/@uri != ''"> |
|
169 |
<a href="{//*[local-name()='modernRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
170 |
</xsl:if> |
|
171 |
</td> |
|
172 |
</tr> |
|
173 |
</tbody> |
|
174 |
</table> |
|
175 |
</td> |
|
176 |
</tr> |
|
177 |
<tr> |
|
178 |
<td class="col-xs-3"><strong>Dating</strong></td> |
|
179 |
<td> |
|
180 |
<xsl:value-of select="//*[local-name()='originDating']" /> |
|
181 |
<table class="table" style="background-color: transparent;"> |
|
182 |
<tbody> |
|
183 |
<tr> |
|
184 |
<td class="col-xs-3"><strong>Not before</strong></td> |
|
185 |
<td><xsl:value-of select="//*[local-name()='originDating']/@notBefore" /></td> |
|
186 |
</tr> |
|
187 |
<tr> |
|
188 |
<td class="col-xs-3"><strong>Not after</strong></td> |
|
189 |
<td><xsl:value-of select="//*[local-name()='originDating']/@notAfter" /></td> |
|
190 |
</tr> |
|
191 |
<tr> |
|
192 |
<td class="col-xs-3"><strong>Dating provided string</strong></td> |
|
193 |
<td><xsl:value-of select="//*[local-name()='originDating']" /></td> |
|
194 |
</tr> |
|
195 |
</tbody> |
|
196 |
</table> |
|
197 |
</td> |
|
198 |
</tr> |
|
199 |
<tr> |
|
200 |
<td class="col-xs-3"><strong>Conservation</strong></td> |
|
201 |
<td> |
|
202 |
<table class="table" style="background-color: transparent;"> |
|
203 |
<tbody> |
|
204 |
<tr> |
|
205 |
<td class="col-xs-3"><strong>State of Conservation</strong></td> |
|
206 |
<td> |
|
207 |
<xsl:value-of select="//*[local-name()='stateOfPreservation']" /> |
|
208 |
<xsl:if test="//*[local-name()='stateOfPreservation']/@uri != ''"> |
|
209 |
<a href="{//*[local-name()='stateOfPreservation']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
210 |
</xsl:if> |
|
211 |
</td> |
|
212 |
</tr> |
|
213 |
<tr> |
|
214 |
<td class="col-xs-3"><strong>Conservation country</strong></td> |
|
215 |
<td> |
|
216 |
<xsl:value-of select="//*[local-name()='conservationCountry']" /> |
|
217 |
<xsl:if test="//*[local-name()='conservationCountry']/@uri != ''"> |
|
218 |
<a href="{//*[local-name()='conservationCountry']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
219 |
</xsl:if> |
|
220 |
</td> |
|
221 |
</tr> |
|
222 |
<tr> |
|
223 |
<td class="col-xs-3"><strong>Conservation region</strong></td> |
|
224 |
<td> |
|
225 |
<xsl:value-of select="//*[local-name()='conservationRegion']" /> |
|
226 |
<xsl:if test="//*[local-name()='conservationRegion']/@uri != ''"> |
|
227 |
<a href="{//*[local-name()='conservationRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
228 |
</xsl:if> |
|
229 |
</td> |
|
230 |
</tr> |
|
231 |
<tr> |
|
232 |
<td class="col-xs-3"><strong>Conservation city</strong></td> |
|
233 |
<td> |
|
234 |
<xsl:value-of select="//*[local-name()='conservationCity']" /> |
|
235 |
<xsl:if test="//*[local-name()='conservationCity']/@uri != ''"> |
|
236 |
<a href="{//*[local-name()='conservationCity']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
237 |
</xsl:if> |
|
238 |
</td> |
|
239 |
</tr> |
|
240 |
<tr> |
|
241 |
<td class="col-xs-3"><strong>Museum</strong></td> |
|
242 |
<td><xsl:value-of select="//*[local-name()='museum']" /></td> |
|
243 |
</tr> |
|
244 |
<tr> |
|
245 |
<td class="col-xs-3"><strong>Position</strong></td> |
|
246 |
<td><xsl:value-of select="//*[local-name()='position']" /></td> |
|
247 |
</tr> |
|
248 |
<tr> |
|
249 |
<td class="col-xs-3"><strong>Inventory number</strong></td> |
|
250 |
<td><xsl:value-of select="//*[local-name()='inventoryNumber']" /></td> |
|
251 |
</tr> |
|
252 |
</tbody> |
|
253 |
</table> |
|
254 |
</td> |
|
255 |
</tr> |
|
256 |
</tbody> |
|
257 |
</table> |
|
258 |
|
|
259 |
<xsl:if test="//*[local-name()='inscription']"> |
|
260 |
<h6><span class="glyphicon glyphicon-pushpin" /> INSCRIPTION DETAILS</h6> |
|
261 |
<table class="table"> |
|
262 |
<tbody> |
|
263 |
<tr> |
|
264 |
<td class="col-xs-3"><strong>Inscription type</strong></td> |
|
265 |
<td> |
|
266 |
<xsl:value-of select="//*[local-name()='inscriptionType']" /> |
|
267 |
<xsl:if test="//*[local-name()='inscriptionType']/@uri != ''"> |
|
268 |
<a href="{//*[local-name()='inscriptionType']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
269 |
</xsl:if> |
|
270 |
</td> |
|
271 |
</tr> |
|
272 |
<tr> |
|
273 |
<td class="col-xs-3"><strong>Engraving</strong></td> |
|
274 |
<td> |
|
275 |
<xsl:value-of select="//*[local-name()='engravingTechnique']" /> |
|
276 |
<xsl:if test="//*[local-name()='engravingTechnique']/@uri != ''"> |
|
277 |
<a href="{//*[local-name()='engravingTechnique']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
278 |
</xsl:if> |
|
279 |
</td> |
|
280 |
</tr> |
|
281 |
<tr> |
|
282 |
<td class="col-xs-3"><strong>Metre</strong></td> |
|
283 |
<td><xsl:value-of select="//*[local-name()='metre']" /></td> |
|
284 |
</tr> |
|
285 |
<tr> |
|
286 |
<td class="col-xs-3"><strong>Paleographic characteristics</strong></td> |
|
287 |
<td><xsl:value-of select="//*[local-name()='paleographicCharacteristics']" /></td> |
|
288 |
</tr> |
|
289 |
<tr> |
|
290 |
<td class="col-xs-3"><strong>Dimensions</strong></td> |
|
291 |
<td> |
|
292 |
<table class="table" style="background-color: transparent;"> |
|
293 |
<tbody> |
|
294 |
<tr> |
|
295 |
<td class="col-xs-3"><strong>Field size</strong></td> |
|
296 |
<td><xsl:call-template name="twodimensions"> |
|
297 |
<xsl:with-param name="w" select="//*[local-name()='fieldSize']/*[local-name()='width']"/> |
|
298 |
<xsl:with-param name="h" select="//*[local-name()='fieldSize']/*[local-name()='height']"/> |
|
299 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
300 |
</xsl:call-template></td> |
|
301 |
</tr> |
|
302 |
<tr> |
|
303 |
<td class="col-xs-3"><strong>Letter size</strong></td> |
|
304 |
<td><xsl:call-template name="twodimensions"> |
|
305 |
<xsl:with-param name="w" select="//*[local-name()='letterSize']/*[local-name()='width']"/> |
|
306 |
<xsl:with-param name="h" select="//*[local-name()='letterSize']/*[local-name()='height']"/> |
|
307 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
308 |
</xsl:call-template></td> |
|
309 |
</tr> |
|
310 |
</tbody> |
|
311 |
</table> |
|
312 |
</td> |
|
313 |
</tr> |
|
314 |
</tbody> |
|
315 |
</table> |
|
316 |
</xsl:if> |
|
317 |
</xsl:when> |
|
318 |
|
|
319 |
<xsl:when test="$type = 'documental'"> |
|
320 |
<h6><span class="glyphicon glyphicon-pencil" /> DOCUMENTAL MANIFESTATION DETAILS</h6> |
|
321 |
<table class="table"> |
|
322 |
<tbody> |
|
323 |
<tr> |
|
324 |
<td class="col-xs-3"><strong>Trismegistos Identifier</strong></td> |
|
325 |
<td><xsl:value-of select="//*[local-name()='tmId']" /><span class="label label-warning">if n/a*** then it is not available</span></td> |
|
326 |
</tr> |
|
327 |
<tr> |
|
328 |
<td class="col-xs-3"><strong>Text</strong></td> |
|
329 |
<td><xsl:value-of select="//*[local-name()='text']" /></td> |
|
330 |
</tr> |
|
331 |
<tr> |
|
332 |
<td class="col-xs-3"><strong>Pretty text</strong></td> |
|
333 |
<td><xsl:copy-of select="//*[local-name()='textHtml']" /></td> |
|
334 |
</tr> |
|
335 |
<tr> |
|
336 |
<td class="col-xs-3"><strong>Critical apparatus</strong></td> |
|
337 |
<td><xsl:value-of select="//*[local-name()='criticalApparatus']" /></td> |
|
338 |
</tr> |
|
339 |
<tr> |
|
340 |
<td class="col-xs-3"><strong>Bibliography</strong></td> |
|
341 |
<td> |
|
342 |
<ul> |
|
343 |
<xsl:for-each select="//*[local-name()='bibliography']"> |
|
344 |
<li><xsl:value-of select="." /></li> |
|
345 |
</xsl:for-each> |
|
346 |
</ul> |
|
347 |
</td> |
|
348 |
</tr> |
|
349 |
<tr> |
|
350 |
<td class="col-xs-3"><strong>Commentary</strong></td> |
|
351 |
<td><xsl:value-of select="//*[local-name()='commentary']" /></td> |
|
352 |
</tr> |
|
353 |
</tbody> |
|
354 |
</table> |
|
355 |
</xsl:when> |
|
356 |
|
|
357 |
<xsl:when test="$type = 'visual'"> |
|
358 |
<h6><span class="glyphicon glyphicon-picture" /> VISUAL REPRESENTATION DETAILS</h6> |
|
359 |
<table class="table"> |
|
360 |
<tbody> |
|
361 |
<tr> |
|
362 |
<td class="col-xs-3"><strong>Image</strong></td> |
|
363 |
<td> |
|
364 |
<img class="img-thumbnail" src="{//*[local-name()='url']}"/> |
|
365 |
</td> |
|
366 |
</tr> |
|
367 |
<tr> |
|
368 |
<td class="col-xs-3"><strong>IPR statement</strong></td> |
|
369 |
<td><xsl:value-of select="//*[local-name()='visualRepresentationIpr']" /></td> |
|
370 |
</tr> |
|
371 |
<tr> |
|
372 |
<td class="col-xs-3"><strong>IPR statement uri</strong></td> |
|
373 |
<td><xsl:value-of select="//*[local-name()='visualRepresentationIpr']/@uri" /></td> |
|
374 |
</tr> |
|
375 |
</tbody> |
|
376 |
</table> |
|
377 |
</xsl:when> |
|
378 |
</xsl:choose> |
|
379 |
</div> |
|
380 |
</div> |
|
381 |
|
|
382 |
<h6><span class="glyphicon glyphicon-link" /> CONNECTED ENTITIES</h6> |
|
383 |
<table class="table"> |
|
384 |
<tbody> |
|
385 |
<xsl:for-each select="//*[local-name()='hasArtifact']"> |
|
386 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
387 |
<tr> |
|
388 |
<td class="col-xs-3"><strong>Artifact</strong></td> |
|
389 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
390 |
</tr> |
|
391 |
</xsl:for-each> |
|
392 |
<xsl:for-each select="//*[local-name()='hasTranscription']"> |
|
393 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
394 |
<tr> |
|
395 |
<td class="col-xs-3"><strong>Transcription</strong></td> |
|
396 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
397 |
</tr> |
|
398 |
</xsl:for-each> |
|
399 |
<xsl:for-each select="//*[local-name()='hasTranslation']"> |
|
400 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
401 |
<tr> |
|
402 |
<td class="col-xs-3"><strong>Translation</strong></td> |
|
403 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
404 |
</tr> |
|
405 |
</xsl:for-each> |
|
406 |
<xsl:for-each select="//*[local-name()='hasVisualRepresentation']"> |
|
407 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
408 |
<tr> |
|
409 |
<td class="col-xs-3"><strong>Visual representation</strong></td> |
|
410 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><img class="img-thumbnail" src="{./thumbnail}" alt="{$linkrel}"/></a></td> |
|
411 |
</tr> |
|
412 |
</xsl:for-each> |
|
413 |
|
|
414 |
</tbody> |
|
415 |
</table> |
|
416 |
|
|
417 |
|
|
418 |
<xsl:for-each select="//*[local-name()='eagleObject']"> |
|
419 |
<h6><span class="glyphicon glyphicon-wrench" /> RECORD XML</h6> |
|
420 |
<xsl:call-template name="xmlItem"> |
|
421 |
<xsl:with-param name="indent" select="string('')" /> |
|
422 |
</xsl:call-template> |
|
423 |
</xsl:for-each> |
|
424 |
</xsl:template> |
|
425 |
|
|
426 |
<xsl:template name="xmlItem"> |
|
427 |
<xsl:param name="indent" /> |
|
428 |
|
|
429 |
<xsl:variable name="tag" select="local-name()" /> |
|
430 |
|
|
431 |
<xsl:variable name="newindent"> |
|
432 |
<xsl:value-of select="$indent" /> |
|
433 |
     |
|
434 |
</xsl:variable> |
|
435 |
|
|
436 |
<xsl:variable name="attribs"> |
|
437 |
<xsl:for-each select="@*"> |
|
438 |
<xsl:value-of select="concat(' ', local-name(), '="', ., '"')" /> |
|
439 |
</xsl:for-each> |
|
440 |
</xsl:variable> |
|
441 |
<xsl:value-of select="$indent" /> |
|
442 |
|
|
443 |
<b> |
|
444 |
<xsl:value-of select="concat('<',$tag)" /> |
|
445 |
</b> |
|
446 |
<i> |
|
447 |
<xsl:value-of select="$attribs" /> |
|
448 |
</i> |
|
449 |
<b>></b> |
|
450 |
|
|
451 |
<xsl:value-of select="text()" /> |
|
452 |
|
|
453 |
<xsl:choose> |
|
454 |
<xsl:when test="count(child::*) > 0"> |
|
455 |
<br /> |
|
456 |
<xsl:for-each select="child::*"> |
|
457 |
<xsl:call-template name="xmlItem"> |
|
458 |
<xsl:with-param name="indent" select="$newindent" /> |
|
459 |
</xsl:call-template> |
|
460 |
<br /> |
|
461 |
</xsl:for-each> |
|
462 |
<xsl:value-of select="$indent" /> |
|
463 |
</xsl:when> |
|
464 |
<xsl:otherwise> |
|
465 |
|
|
466 |
</xsl:otherwise> |
|
467 |
</xsl:choose> |
|
468 |
|
|
469 |
<b> |
|
470 |
<xsl:value-of select="concat('</',$tag,'>')" /> |
|
471 |
</b> |
|
472 |
|
|
473 |
</xsl:template> |
|
474 |
|
|
475 |
<xsl:template name="threedimensions"> |
|
476 |
<xsl:param name="w"/> |
|
477 |
<xsl:param name="h"/> |
|
478 |
<xsl:param name="d"/> |
|
479 |
<xsl:param name="unit"/> |
|
480 |
|
|
481 |
<xsl:variable name="actualW"> |
|
482 |
<xsl:choose> |
|
483 |
<xsl:when test="normalize-space($w) != ''"> |
|
484 |
<xsl:value-of select="normalize-space($w)"/> |
|
485 |
</xsl:when> |
|
486 |
<xsl:otherwise>??</xsl:otherwise> |
|
487 |
</xsl:choose> |
|
488 |
</xsl:variable> |
|
489 |
<xsl:variable name="actualH"> |
|
490 |
<xsl:choose> |
|
491 |
<xsl:when test="normalize-space($h) != ''"> |
|
492 |
<xsl:value-of select="normalize-space($h)"/> |
|
493 |
</xsl:when> |
|
494 |
<xsl:otherwise>??</xsl:otherwise> |
|
495 |
</xsl:choose> |
|
496 |
</xsl:variable> |
|
497 |
<xsl:variable name="actualD"> |
|
498 |
<xsl:choose> |
|
499 |
<xsl:when test="normalize-space($d) != ''"> |
|
500 |
<xsl:value-of select="normalize-space($d)"/> |
|
501 |
</xsl:when> |
|
502 |
<xsl:otherwise>??</xsl:otherwise> |
|
503 |
</xsl:choose> |
|
504 |
</xsl:variable> |
|
505 |
|
|
506 |
<xsl:value-of select="concat($actualW,' x ', $actualH,' x ', $actualD, ' (', $unit, ')')"/> |
|
507 |
</xsl:template> |
|
508 |
|
|
509 |
<xsl:template name="twodimensions"> |
|
510 |
<xsl:param name="w"/> |
|
511 |
<xsl:param name="h"/> |
|
512 |
<xsl:param name="d"/> |
|
513 |
<xsl:param name="unit"/> |
|
514 |
|
|
515 |
<xsl:variable name="actualW"> |
|
516 |
<xsl:choose> |
|
517 |
<xsl:when test="normalize-space($w) != ''"> |
|
518 |
<xsl:value-of select="normalize-space($w)"/> |
|
519 |
</xsl:when> |
|
520 |
<xsl:otherwise>??</xsl:otherwise> |
|
521 |
</xsl:choose> |
|
522 |
</xsl:variable> |
|
523 |
<xsl:variable name="actualH"> |
|
524 |
<xsl:choose> |
|
525 |
<xsl:when test="normalize-space($h) != ''"> |
|
526 |
<xsl:value-of select="normalize-space($h)"/> |
|
527 |
</xsl:when> |
|
528 |
<xsl:otherwise>??</xsl:otherwise> |
|
529 |
</xsl:choose> |
|
530 |
</xsl:variable> |
|
531 |
|
|
532 |
<xsl:value-of select="concat($actualW,' x ', $actualH, ' (', $unit, ')')"/> |
|
533 |
</xsl:template> |
|
534 |
|
|
535 |
</xsl:stylesheet> |
modules/dnet-eagle-profiles/trunk/src/main/resources/eu/dnetlib/functionality/modular/ui/xslt/emf_2_document.xslt | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="2.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
6 |
|
|
7 |
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<div class="row"> |
|
11 |
<div class="col-xs-2"> |
|
12 |
<xsl:variable name="type" select="//*[local-name()='entityType']" /> |
|
13 |
<xsl:choose> |
|
14 |
<xsl:when test="$type = 'artifact'"> |
|
15 |
<img src="../resources/img/eagle/artifact.png" width="80" height="80" /> |
|
16 |
</xsl:when> |
|
17 |
<xsl:when test="$type = 'documental'"> |
|
18 |
<img src="../resources/img/eagle/doc.png" width="80" height="80" /> |
|
19 |
</xsl:when> |
|
20 |
<xsl:when test="$type = 'visual'"> |
|
21 |
<img src="../resources/img/eagle/pic.png" width="80" height="80" /> |
|
22 |
</xsl:when> |
|
23 |
</xsl:choose> |
|
24 |
</div> |
|
25 |
<div class="col-xs-10"> |
|
26 |
<xsl:if test="//*[local-name()='title']"> |
|
27 |
<h1 id="overview" ><xsl:value-of select="//*[local-name()='title']" /></h1> |
|
28 |
</xsl:if> |
|
29 |
</div> |
|
30 |
</div> |
|
31 |
|
|
32 |
<div class="row"> |
|
33 |
<div class="col-xs-12"> |
|
34 |
<h6><span class="glyphicon glyphicon-align-left" /> GENERAL INFORMATION</h6> |
|
35 |
<table class="table"> |
|
36 |
<tbody> |
|
37 |
<tr> |
|
38 |
<td class="col-xs-3"><strong>Title</strong></td> |
|
39 |
<td><xsl:value-of select="//*[local-name()='title']" /></td> |
|
40 |
</tr> |
|
41 |
<tr> |
|
42 |
<td class="col-xs-3"><strong>Description</strong></td> |
|
43 |
<td><xsl:value-of select="//*[local-name()='description']" /></td> |
|
44 |
</tr> |
|
45 |
<tr> |
|
46 |
<td class="col-xs-3"><strong>Provided by</strong></td> |
|
47 |
<td><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@providerName" /></td> |
|
48 |
</tr> |
|
49 |
<tr> |
|
50 |
<td class="col-xs-3"><strong>Landing page</strong></td> |
|
51 |
<td><a href="{//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@landingPage}"><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']/@landingPage" /></a><span class="label label-warning">This HAS to resolve on a valid page!</span></td> |
|
52 |
</tr> |
|
53 |
<tr> |
|
54 |
<td class="col-xs-3"><strong>Local identifier (a.k.a. CP-ID)</strong></td> |
|
55 |
<td><xsl:value-of select="//*[local-name()='eagleObject']/*[local-name()='recordSourceInfo']" /><span class="label label-warning">This MUST be an ID, not an URL!</span></td> |
|
56 |
</tr> |
|
57 |
<tr> |
|
58 |
<td class="col-xs-3"><strong>Last edit</strong></td> |
|
59 |
<td><xsl:value-of select="//*[local-name()='dateEdited']" /></td> |
|
60 |
</tr> |
|
61 |
<tr> |
|
62 |
<td class="col-xs-3"><strong>Edited by</strong></td> |
|
63 |
<td><xsl:value-of select="//*[local-name()='metadataEditor']" /></td> |
|
64 |
</tr> |
|
65 |
<tr> |
|
66 |
<td class="col-xs-3"><strong>Collected on</strong></td> |
|
67 |
<td><xsl:value-of select="//*[local-name()='dateOfCollection']" /></td> |
|
68 |
</tr> |
|
69 |
</tbody> |
|
70 |
</table> |
|
71 |
|
|
72 |
<xsl:variable name="type" select="//*[local-name()='entityType']" /> |
|
73 |
<xsl:choose> |
|
74 |
<xsl:when test="$type = 'artifact'"> |
|
75 |
<h6><span class="glyphicon glyphicon-tower" /> ARTIFACT DETAILS</h6> |
|
76 |
<table class="table"> |
|
77 |
<tbody> |
|
78 |
<tr> |
|
79 |
<td class="col-xs-3"><strong>Object type</strong></td> |
|
80 |
<td> |
|
81 |
<xsl:value-of select="//*[local-name()='objectType']" /> |
|
82 |
<xsl:if test="//*[local-name()='objectType']/@uri != ''"> |
|
83 |
<a href="{//*[local-name()='objectType']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
84 |
</xsl:if> |
|
85 |
</td> |
|
86 |
</tr> |
|
87 |
<tr> |
|
88 |
<td class="col-xs-3"><strong>Material</strong></td> |
|
89 |
<td> |
|
90 |
<xsl:value-of select="//*[local-name()='material']" /> |
|
91 |
<xsl:if test="//*[local-name()='material']/@uri != ''"> |
|
92 |
<a href="{//*[local-name()='material']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
93 |
</xsl:if> |
|
94 |
</td> |
|
95 |
</tr> |
|
96 |
<tr> |
|
97 |
<td class="col-xs-3"><strong>Dimensions</strong></td> |
|
98 |
<td><xsl:call-template name="threedimensions"> |
|
99 |
<xsl:with-param name="w" select="//*[local-name()='dimensions']/*[local-name()='width']"/> |
|
100 |
<xsl:with-param name="h" select="//*[local-name()='dimensions']/*[local-name()='height']"/> |
|
101 |
<xsl:with-param name="d" select="//*[local-name()='dimensions']/*[local-name()='depth']"/> |
|
102 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
103 |
</xsl:call-template></td> |
|
104 |
</tr> |
|
105 |
<tr> |
|
106 |
<td class="col-xs-3"><strong>Decoration</strong></td> |
|
107 |
<td> |
|
108 |
<xsl:value-of select="//*[local-name()='decoration']" /> |
|
109 |
<xsl:if test="//*[local-name()='decoration']/@uri != ''"> |
|
110 |
<a href="{//*[local-name()='decoration']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
111 |
</xsl:if> |
|
112 |
</td> |
|
113 |
</tr> |
|
114 |
<tr> |
|
115 |
<td class="col-xs-3"><strong>Places</strong></td> |
|
116 |
<td> |
|
117 |
<table class="table" style="background-color: transparent;"> |
|
118 |
<tbody> |
|
119 |
<tr> |
|
120 |
<td class="col-xs-3"><strong>Roman province italic region</strong></td> |
|
121 |
<td> |
|
122 |
<xsl:value-of select="//*[local-name()='romanProvinceItalicRegion']" /> |
|
123 |
<xsl:if test="//*[local-name()='romanProvinceItalicRegion']/@uri != ''"> |
|
124 |
<a href="{//*[local-name()='romanProvinceItalicRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
125 |
</xsl:if> |
|
126 |
</td> |
|
127 |
</tr> |
|
128 |
<tr> |
|
129 |
<td class="col-xs-3"><strong>Ancient find spot</strong></td> |
|
130 |
<td> |
|
131 |
<xsl:value-of select="//*[local-name()='ancientFindSpot']" /> |
|
132 |
<xsl:if test="//*[local-name()='ancientFindSpot']/@uri != ''"> |
|
133 |
<a href="{//*[local-name()='ancientFindSpot']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
134 |
</xsl:if> |
|
135 |
</td> |
|
136 |
</tr> |
|
137 |
<tr> |
|
138 |
<td class="col-xs-3"><strong>Modern find spot</strong></td> |
|
139 |
<td> |
|
140 |
<xsl:value-of select="//*[local-name()='modernFindSpot']" /> |
|
141 |
<xsl:if test="//*[local-name()='modernFindSpot']/@uri != ''"> |
|
142 |
<a href="{//*[local-name()='modernFindSpot']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
143 |
</xsl:if> |
|
144 |
</td> |
|
145 |
</tr> |
|
146 |
<tr> |
|
147 |
<td class="col-xs-3"><strong>Modern country</strong></td> |
|
148 |
<td> |
|
149 |
<xsl:value-of select="//*[local-name()='modernCountry']" /> |
|
150 |
<xsl:if test="//*[local-name()='modernCountry']/@uri != ''"> |
|
151 |
<a href="{//*[local-name()='modernCountry']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
152 |
</xsl:if> |
|
153 |
</td> |
|
154 |
</tr> |
|
155 |
<tr> |
|
156 |
<td class="col-xs-3"><strong>Modern province</strong></td> |
|
157 |
<td> |
|
158 |
<xsl:value-of select="//*[local-name()='modernProvince']" /> |
|
159 |
<xsl:if test="//*[local-name()='modernProvince']/@uri != ''"> |
|
160 |
<a href="{//*[local-name()='modernProvince']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
161 |
</xsl:if> |
|
162 |
</td> |
|
163 |
</tr> |
|
164 |
<tr> |
|
165 |
<td class="col-xs-3"><strong>Modern region</strong></td> |
|
166 |
<td> |
|
167 |
<xsl:value-of select="//*[local-name()='modernRegion']" /> |
|
168 |
<xsl:if test="//*[local-name()='modernRegion']/@uri != ''"> |
|
169 |
<a href="{//*[local-name()='modernRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
170 |
</xsl:if> |
|
171 |
</td> |
|
172 |
</tr> |
|
173 |
</tbody> |
|
174 |
</table> |
|
175 |
</td> |
|
176 |
</tr> |
|
177 |
<tr> |
|
178 |
<td class="col-xs-3"><strong>Dating</strong></td> |
|
179 |
<td> |
|
180 |
<xsl:value-of select="//*[local-name()='originDating']" /> |
|
181 |
<table class="table" style="background-color: transparent;"> |
|
182 |
<tbody> |
|
183 |
<tr> |
|
184 |
<td class="col-xs-3"><strong>Not before</strong></td> |
|
185 |
<td><xsl:value-of select="//*[local-name()='originDating']/@notBefore" /></td> |
|
186 |
</tr> |
|
187 |
<tr> |
|
188 |
<td class="col-xs-3"><strong>Not after</strong></td> |
|
189 |
<td><xsl:value-of select="//*[local-name()='originDating']/@notAfter" /></td> |
|
190 |
</tr> |
|
191 |
<tr> |
|
192 |
<td class="col-xs-3"><strong>Dating provided string</strong></td> |
|
193 |
<td><xsl:value-of select="//*[local-name()='originDating']" /></td> |
|
194 |
</tr> |
|
195 |
</tbody> |
|
196 |
</table> |
|
197 |
</td> |
|
198 |
</tr> |
|
199 |
<tr> |
|
200 |
<td class="col-xs-3"><strong>Conservation</strong></td> |
|
201 |
<td> |
|
202 |
<table class="table" style="background-color: transparent;"> |
|
203 |
<tbody> |
|
204 |
<tr> |
|
205 |
<td class="col-xs-3"><strong>State of Conservation</strong></td> |
|
206 |
<td> |
|
207 |
<xsl:value-of select="//*[local-name()='stateOfPreservation']" /> |
|
208 |
<xsl:if test="//*[local-name()='stateOfPreservation']/@uri != ''"> |
|
209 |
<a href="{//*[local-name()='stateOfPreservation']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
210 |
</xsl:if> |
|
211 |
</td> |
|
212 |
</tr> |
|
213 |
<tr> |
|
214 |
<td class="col-xs-3"><strong>Conservation country</strong></td> |
|
215 |
<td> |
|
216 |
<xsl:value-of select="//*[local-name()='conservationCountry']" /> |
|
217 |
<xsl:if test="//*[local-name()='conservationCountry']/@uri != ''"> |
|
218 |
<a href="{//*[local-name()='conservationCountry']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
219 |
</xsl:if> |
|
220 |
</td> |
|
221 |
</tr> |
|
222 |
<tr> |
|
223 |
<td class="col-xs-3"><strong>Conservation region</strong></td> |
|
224 |
<td> |
|
225 |
<xsl:value-of select="//*[local-name()='conservationRegion']" /> |
|
226 |
<xsl:if test="//*[local-name()='conservationRegion']/@uri != ''"> |
|
227 |
<a href="{//*[local-name()='conservationRegion']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
228 |
</xsl:if> |
|
229 |
</td> |
|
230 |
</tr> |
|
231 |
<tr> |
|
232 |
<td class="col-xs-3"><strong>Conservation city</strong></td> |
|
233 |
<td> |
|
234 |
<xsl:value-of select="//*[local-name()='conservationCity']" /> |
|
235 |
<xsl:if test="//*[local-name()='conservationCity']/@uri != ''"> |
|
236 |
<a href="{//*[local-name()='conservationCity']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
237 |
</xsl:if> |
|
238 |
</td> |
|
239 |
</tr> |
|
240 |
<tr> |
|
241 |
<td class="col-xs-3"><strong>Museum</strong></td> |
|
242 |
<td><xsl:value-of select="//*[local-name()='museum']" /></td> |
|
243 |
</tr> |
|
244 |
<tr> |
|
245 |
<td class="col-xs-3"><strong>Position</strong></td> |
|
246 |
<td><xsl:value-of select="//*[local-name()='position']" /></td> |
|
247 |
</tr> |
|
248 |
<tr> |
|
249 |
<td class="col-xs-3"><strong>Inventory number</strong></td> |
|
250 |
<td><xsl:value-of select="//*[local-name()='inventoryNumber']" /></td> |
|
251 |
</tr> |
|
252 |
</tbody> |
|
253 |
</table> |
|
254 |
</td> |
|
255 |
</tr> |
|
256 |
</tbody> |
|
257 |
</table> |
|
258 |
|
|
259 |
<xsl:if test="//*[local-name()='inscription']"> |
|
260 |
<h6><span class="glyphicon glyphicon-pushpin" /> INSCRIPTION DETAILS</h6> |
|
261 |
<table class="table"> |
|
262 |
<tbody> |
|
263 |
<tr> |
|
264 |
<td class="col-xs-3"><strong>Inscription type</strong></td> |
|
265 |
<td> |
|
266 |
<xsl:value-of select="//*[local-name()='inscriptionType']" /> |
|
267 |
<xsl:if test="//*[local-name()='inscriptionType']/@uri != ''"> |
|
268 |
<a href="{//*[local-name()='inscriptionType']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
269 |
</xsl:if> |
|
270 |
</td> |
|
271 |
</tr> |
|
272 |
<tr> |
|
273 |
<td class="col-xs-3"><strong>Engraving</strong></td> |
|
274 |
<td> |
|
275 |
<xsl:value-of select="//*[local-name()='engravingTechnique']" /> |
|
276 |
<xsl:if test="//*[local-name()='engravingTechnique']/@uri != ''"> |
|
277 |
<a href="{//*[local-name()='engravingTechnique']/@uri}"><span class="glyphicon glyphicon-link"/></a> |
|
278 |
</xsl:if> |
|
279 |
</td> |
|
280 |
</tr> |
|
281 |
<tr> |
|
282 |
<td class="col-xs-3"><strong>Metre</strong></td> |
|
283 |
<td><xsl:value-of select="//*[local-name()='metre']" /></td> |
|
284 |
</tr> |
|
285 |
<tr> |
|
286 |
<td class="col-xs-3"><strong>Paleographic characteristics</strong></td> |
|
287 |
<td><xsl:value-of select="//*[local-name()='paleographicCharacteristics']" /></td> |
|
288 |
</tr> |
|
289 |
<tr> |
|
290 |
<td class="col-xs-3"><strong>Dimensions</strong></td> |
|
291 |
<td> |
|
292 |
<table class="table" style="background-color: transparent;"> |
|
293 |
<tbody> |
|
294 |
<tr> |
|
295 |
<td class="col-xs-3"><strong>Field size</strong></td> |
|
296 |
<td><xsl:call-template name="twodimensions"> |
|
297 |
<xsl:with-param name="w" select="//*[local-name()='fieldSize']/*[local-name()='width']"/> |
|
298 |
<xsl:with-param name="h" select="//*[local-name()='fieldSize']/*[local-name()='height']"/> |
|
299 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
300 |
</xsl:call-template></td> |
|
301 |
</tr> |
|
302 |
<tr> |
|
303 |
<td class="col-xs-3"><strong>Letter size</strong></td> |
|
304 |
<td><xsl:call-template name="twodimensions"> |
|
305 |
<xsl:with-param name="w" select="//*[local-name()='letterSize']/*[local-name()='width']"/> |
|
306 |
<xsl:with-param name="h" select="//*[local-name()='letterSize']/*[local-name()='height']"/> |
|
307 |
<xsl:with-param name="unit" select="//*[local-name()='dimensions']/@unit"/> |
|
308 |
</xsl:call-template></td> |
|
309 |
</tr> |
|
310 |
</tbody> |
|
311 |
</table> |
|
312 |
</td> |
|
313 |
</tr> |
|
314 |
</tbody> |
|
315 |
</table> |
|
316 |
</xsl:if> |
|
317 |
</xsl:when> |
|
318 |
|
|
319 |
<xsl:when test="$type = 'documental'"> |
|
320 |
<h6><span class="glyphicon glyphicon-pencil" /> DOCUMENTAL MANIFESTATION DETAILS</h6> |
|
321 |
<table class="table"> |
|
322 |
<tbody> |
|
323 |
<tr> |
|
324 |
<td class="col-xs-3"><strong>Trismegistos Identifier</strong></td> |
|
325 |
<td><xsl:value-of select="//*[local-name()='tmId']" /><span class="label label-warning">if n/a*** then it is not available</span></td> |
|
326 |
</tr> |
|
327 |
<tr> |
|
328 |
<td class="col-xs-3"><strong>Text</strong></td> |
|
329 |
<td><xsl:value-of select="//*[local-name()='text']" /></td> |
|
330 |
</tr> |
|
331 |
<tr> |
|
332 |
<td class="col-xs-3"><strong>Pretty text</strong></td> |
|
333 |
<td><xsl:copy-of select="//*[local-name()='textHtml']" /></td> |
|
334 |
</tr> |
|
335 |
<tr> |
|
336 |
<td class="col-xs-3"><strong>Critical apparatus</strong></td> |
|
337 |
<td><xsl:value-of select="//*[local-name()='criticalApparatus']" /></td> |
|
338 |
</tr> |
|
339 |
<tr> |
|
340 |
<td class="col-xs-3"><strong>Bibliography</strong></td> |
|
341 |
<td> |
|
342 |
<ul> |
|
343 |
<xsl:for-each select="//*[local-name()='bibliography']"> |
|
344 |
<li><xsl:value-of select="." /></li> |
|
345 |
</xsl:for-each> |
|
346 |
</ul> |
|
347 |
</td> |
|
348 |
</tr> |
|
349 |
<tr> |
|
350 |
<td class="col-xs-3"><strong>Commentary</strong></td> |
|
351 |
<td><xsl:value-of select="//*[local-name()='commentary']" /></td> |
|
352 |
</tr> |
|
353 |
</tbody> |
|
354 |
</table> |
|
355 |
</xsl:when> |
|
356 |
|
|
357 |
<xsl:when test="$type = 'visual'"> |
|
358 |
<h6><span class="glyphicon glyphicon-picture" /> VISUAL REPRESENTATION DETAILS</h6> |
|
359 |
<table class="table"> |
|
360 |
<tbody> |
|
361 |
<tr> |
|
362 |
<td class="col-xs-3"><strong>Image</strong></td> |
|
363 |
<td> |
|
364 |
<img class="img-thumbnail" src="{//*[local-name()='url']}"/> |
|
365 |
</td> |
|
366 |
</tr> |
|
367 |
<tr> |
|
368 |
<td class="col-xs-3"><strong>IPR statement</strong></td> |
|
369 |
<td><xsl:value-of select="//*[local-name()='visualRepresentationIpr']" /></td> |
|
370 |
</tr> |
|
371 |
<tr> |
|
372 |
<td class="col-xs-3"><strong>IPR statement uri</strong></td> |
|
373 |
<td><xsl:value-of select="//*[local-name()='visualRepresentationIpr']/@uri" /></td> |
|
374 |
</tr> |
|
375 |
</tbody> |
|
376 |
</table> |
|
377 |
</xsl:when> |
|
378 |
</xsl:choose> |
|
379 |
</div> |
|
380 |
</div> |
|
381 |
|
|
382 |
<h6><span class="glyphicon glyphicon-link" /> CONNECTED ENTITIES</h6> |
|
383 |
<table class="table"> |
|
384 |
<tbody> |
|
385 |
<xsl:for-each select="//*[local-name()='hasArtifact']"> |
|
386 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
387 |
<tr> |
|
388 |
<td class="col-xs-3"><strong>Artifact</strong></td> |
|
389 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
390 |
</tr> |
|
391 |
</xsl:for-each> |
|
392 |
<xsl:for-each select="//*[local-name()='hasTranscription']"> |
|
393 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
394 |
<tr> |
|
395 |
<td class="col-xs-3"><strong>Transcription</strong></td> |
|
396 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
397 |
</tr> |
|
398 |
</xsl:for-each> |
|
399 |
<xsl:for-each select="//*[local-name()='hasTranslation']"> |
|
400 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
401 |
<tr> |
|
402 |
<td class="col-xs-3"><strong>Translation</strong></td> |
|
403 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><xsl:value-of select="$linkrel" /></a></td> |
|
404 |
</tr> |
|
405 |
</xsl:for-each> |
|
406 |
<xsl:for-each select="//*[local-name()='hasVisualRepresentation']"> |
|
407 |
<xsl:variable name="linkrel" select="./dnetResourceIdentifier" /> |
|
408 |
<tr> |
|
409 |
<td class="col-xs-3"><strong>Visual representation</strong></td> |
|
410 |
<td><a href="#/doc/dnetresourceidentifier/{$linkrel}"><img class="img-thumbnail" src="{./thumbnail}" alt="{$linkrel}"/></a></td> |
|
411 |
</tr> |
|
412 |
</xsl:for-each> |
|
413 |
|
|
414 |
</tbody> |
|
415 |
</table> |
|
416 |
|
|
417 |
|
|
418 |
<xsl:for-each select="//*[local-name()='eagleObject']"> |
|
419 |
<h6><span class="glyphicon glyphicon-wrench" /> RECORD XML</h6> |
|
420 |
<xsl:call-template name="xmlItem"> |
|
421 |
<xsl:with-param name="indent" select="string('')" /> |
|
422 |
</xsl:call-template> |
|
423 |
</xsl:for-each> |
|
424 |
</xsl:template> |
|
425 |
|
|
426 |
<xsl:template name="xmlItem"> |
|
427 |
<xsl:param name="indent" /> |
|
428 |
|
|
429 |
<xsl:variable name="tag" select="local-name()" /> |
|
430 |
|
|
431 |
<xsl:variable name="newindent"> |
|
432 |
<xsl:value-of select="$indent" /> |
|
433 |
     |
|
434 |
</xsl:variable> |
|
435 |
|
|
436 |
<xsl:variable name="attribs"> |
|
437 |
<xsl:for-each select="@*"> |
|
438 |
<xsl:value-of select="concat(' ', local-name(), '="', ., '"')" /> |
|
439 |
</xsl:for-each> |
|
440 |
</xsl:variable> |
|
441 |
<xsl:value-of select="$indent" /> |
|
442 |
|
|
443 |
<b> |
|
444 |
<xsl:value-of select="concat('<',$tag)" /> |
|
445 |
</b> |
|
446 |
<i> |
|
447 |
<xsl:value-of select="$attribs" /> |
|
448 |
</i> |
|
449 |
<b>></b> |
|
450 |
|
|
451 |
<xsl:value-of select="text()" /> |
|
452 |
|
|
453 |
<xsl:choose> |
|
454 |
<xsl:when test="count(child::*) > 0"> |
|
455 |
<br /> |
|
456 |
<xsl:for-each select="child::*"> |
|
457 |
<xsl:call-template name="xmlItem"> |
|
458 |
<xsl:with-param name="indent" select="$newindent" /> |
|
459 |
</xsl:call-template> |
|
460 |
<br /> |
|
461 |
</xsl:for-each> |
|
462 |
<xsl:value-of select="$indent" /> |
|
463 |
</xsl:when> |
|
464 |
<xsl:otherwise> |
|
465 |
|
|
466 |
</xsl:otherwise> |
|
467 |
</xsl:choose> |
|
468 |
|
|
469 |
<b> |
|
470 |
<xsl:value-of select="concat('</',$tag,'>')" /> |
|
471 |
</b> |
|
472 |
|
|
473 |
</xsl:template> |
|
474 |
|
|
475 |
<xsl:template name="threedimensions"> |
|
476 |
<xsl:param name="w"/> |
|
477 |
<xsl:param name="h"/> |
|
478 |
<xsl:param name="d"/> |
|
479 |
<xsl:param name="unit"/> |
|
480 |
|
|
481 |
<xsl:variable name="actualW"> |
|
482 |
<xsl:choose> |
|
483 |
<xsl:when test="normalize-space($w) != ''"> |
|
484 |
<xsl:value-of select="normalize-space($w)"/> |
|
485 |
</xsl:when> |
|
486 |
<xsl:otherwise>??</xsl:otherwise> |
|
487 |
</xsl:choose> |
|
488 |
</xsl:variable> |
|
489 |
<xsl:variable name="actualH"> |
|
490 |
<xsl:choose> |
|
491 |
<xsl:when test="normalize-space($h) != ''"> |
|
492 |
<xsl:value-of select="normalize-space($h)"/> |
|
493 |
</xsl:when> |
|
494 |
<xsl:otherwise>??</xsl:otherwise> |
|
495 |
</xsl:choose> |
|
496 |
</xsl:variable> |
|
497 |
<xsl:variable name="actualD"> |
|
498 |
<xsl:choose> |
|
499 |
<xsl:when test="normalize-space($d) != ''"> |
|
500 |
<xsl:value-of select="normalize-space($d)"/> |
|
501 |
</xsl:when> |
|
502 |
<xsl:otherwise>??</xsl:otherwise> |
|
503 |
</xsl:choose> |
|
504 |
</xsl:variable> |
|
505 |
|
|
506 |
<xsl:value-of select="concat($actualW,' x ', $actualH,' x ', $actualD, ' (', $unit, ')')"/> |
|
507 |
</xsl:template> |
|
508 |
|
|
509 |
<xsl:template name="twodimensions"> |
|
510 |
<xsl:param name="w"/> |
|
511 |
<xsl:param name="h"/> |
|
512 |
<xsl:param name="d"/> |
|
513 |
<xsl:param name="unit"/> |
|
514 |
|
|
515 |
<xsl:variable name="actualW"> |
|
516 |
<xsl:choose> |
|
517 |
<xsl:when test="normalize-space($w) != ''"> |
|
518 |
<xsl:value-of select="normalize-space($w)"/> |
|
519 |
</xsl:when> |
|
520 |
<xsl:otherwise>??</xsl:otherwise> |
|
521 |
</xsl:choose> |
|
522 |
</xsl:variable> |
|
523 |
<xsl:variable name="actualH"> |
|
524 |
<xsl:choose> |
|
525 |
<xsl:when test="normalize-space($h) != ''"> |
|
526 |
<xsl:value-of select="normalize-space($h)"/> |
|
527 |
</xsl:when> |
|
528 |
<xsl:otherwise>??</xsl:otherwise> |
|
529 |
</xsl:choose> |
|
530 |
</xsl:variable> |
|
531 |
|
|
532 |
<xsl:value-of select="concat($actualW,' x ', $actualH, ' (', $unit, ')')"/> |
|
533 |
</xsl:template> |
|
534 |
|
|
535 |
</xsl:stylesheet> |
modules/dnet-eagle-profiles/trunk/src/main/resources/eu/dnetlib/functionality/modular/ui/xslt/emf_2_row.xslt | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="2.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
6 |
|
|
7 |
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<xsl:variable name="id" select="//*[local-name() = 'objIdentifier']" /> |
|
11 |
<xsl:variable name="type" select="//*[local-name() = 'entityType' ]" /> |
|
12 |
<xsl:variable name="url" select="//*[local-name() = 'url' ]" /> |
|
13 |
|
|
14 |
<div class="well"> |
|
15 |
<table> |
|
16 |
<tr> |
|
17 |
<td style="width: 120px"> |
|
18 |
<xsl:choose> |
|
19 |
<xsl:when test="$type = 'artifact'"> |
|
20 |
<img src="../resources/img/eagle/artifact.png" width="80" height="80" /> |
|
21 |
</xsl:when> |
|
22 |
<xsl:when test="$type = 'documental'"> |
|
23 |
<img src="../resources/img/eagle/doc.png" width="80" height="80" /> |
|
24 |
</xsl:when> |
|
25 |
<xsl:when test="$type = 'visual'"> |
|
26 |
<img src="../resources/img/eagle/pic.png" width="80" height="80" /> |
|
27 |
</xsl:when> |
|
28 |
</xsl:choose> |
|
29 |
</td> |
|
30 |
<td> |
|
31 |
<strong>Title: </strong><xsl:value-of select="//*[local-name()='title']" /><br/> |
|
32 |
<strong>Entity type: </strong><xsl:value-of select="$type" /><br/> |
|
33 |
<strong>Description: </strong><i><xsl:value-of select="//*[local-name()='description']" /></i><br/> |
|
34 |
<xsl:if test="$url"> |
|
35 |
<br/><b>Image at: </b> |
|
36 |
<a href="{$url}"><xsl:value-of select="$url" /></a><br /> |
|
37 |
</xsl:if> |
|
38 |
<br /> |
|
39 |
<button class="btn btn-primary btn-sm" ng-click="getDocument('objidentifier', '{$id}')">show record</button> |
|
40 |
</td> |
|
41 |
</tr> |
|
42 |
</table> |
|
43 |
</div> |
|
44 |
</xsl:template> |
|
45 |
|
|
46 |
</xsl:stylesheet> |
Also available in: Unified diff
lightUI xslts for eagle have been moved to egle-profiles