1 |
46254
|
alessia.ba
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
|
3 |
46368
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
|
4 |
47577
|
alessia.ba
|
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
|
5 |
|
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
6 |
|
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
7 |
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
8 |
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
9 |
48821
|
alessia.ba
|
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
|
10 |
46254
|
alessia.ba
|
|
11 |
|
|
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
|
12 |
|
|
|
13 |
|
|
<xsl:template match="/">
|
14 |
|
|
<div class="row">
|
15 |
|
|
<div class="col-xs-2">
|
16 |
|
|
<img src="../resources/img/record.png" width="80" height="80"/>
|
17 |
|
|
</div>
|
18 |
|
|
<div class="col-xs-10">
|
19 |
48821
|
alessia.ba
|
<xsl:if test="//*[local-name() = 'title']">
|
20 |
46254
|
alessia.ba
|
<h1 id="overview">
|
21 |
48767
|
alessia.ba
|
<!-- this is visualized big next to the picture. Since we cannot identify 1 main title, for Parthenos it wil be empty -->
|
22 |
|
|
<!--<xsl:value-of select="/crm:P102_has_title"/>-->
|
23 |
46254
|
alessia.ba
|
</h1>
|
24 |
|
|
</xsl:if>
|
25 |
|
|
</div>
|
26 |
|
|
</div>
|
27 |
|
|
|
28 |
|
|
<div class="row">
|
29 |
|
|
<div class="col-xs-12">
|
30 |
48821
|
alessia.ba
|
<h6><span class="glyphicon glyphicon-align-left"/> GENERAL INFORMATION </h6>
|
31 |
46254
|
alessia.ba
|
<table class="table">
|
32 |
|
|
<tbody>
|
33 |
|
|
<tr>
|
34 |
|
|
<td class="col-xs-3">
|
35 |
48767
|
alessia.ba
|
<strong>Original identifier</strong>
|
36 |
46254
|
alessia.ba
|
</td>
|
37 |
|
|
<td>
|
38 |
48821
|
alessia.ba
|
<xsl:choose>
|
39 |
|
|
<xsl:when test="starts-with(//dri:objIdentifier, 'http')">
|
40 |
|
|
<a href="{//dri:recordIdentifier}" target="_blank"><xsl:value-of select="//dri:recordIdentifier"/></a>
|
41 |
|
|
</xsl:when>
|
42 |
|
|
<xsl:otherwise><xsl:value-of select="//dri:recordIdentifier"/></xsl:otherwise>
|
43 |
|
|
</xsl:choose>
|
44 |
|
|
|
45 |
46254
|
alessia.ba
|
</td>
|
46 |
|
|
</tr>
|
47 |
|
|
<tr>
|
48 |
|
|
<td class="col-xs-3">
|
49 |
48767
|
alessia.ba
|
<strong>Provenance</strong>
|
50 |
46254
|
alessia.ba
|
</td>
|
51 |
|
|
<td>
|
52 |
48821
|
alessia.ba
|
<i>Data source: </i>
|
53 |
|
|
<xsl:value-of select="//dri:datasourcename"/>
|
54 |
|
|
<br/>
|
55 |
|
|
<i>D-Net API: </i>
|
56 |
|
|
<xsl:value-of select="//dri:datasourceapi"/>
|
57 |
46254
|
alessia.ba
|
</td>
|
58 |
|
|
</tr>
|
59 |
|
|
<tr>
|
60 |
|
|
<td class="col-xs-3">
|
61 |
48767
|
alessia.ba
|
<strong>Collected</strong>
|
62 |
46254
|
alessia.ba
|
</td>
|
63 |
|
|
<td>
|
64 |
48767
|
alessia.ba
|
<xsl:value-of select="//dri:dateOfCollection"/>
|
65 |
46254
|
alessia.ba
|
</td>
|
66 |
|
|
</tr>
|
67 |
|
|
<tr>
|
68 |
|
|
<td class="col-xs-3">
|
69 |
48767
|
alessia.ba
|
<strong>Transformed</strong>
|
70 |
46254
|
alessia.ba
|
</td>
|
71 |
|
|
<td>
|
72 |
48767
|
alessia.ba
|
<xsl:value-of select="//dri:dateOfTransformation"/>
|
73 |
|
|
</td>
|
74 |
|
|
</tr>
|
75 |
|
|
<tr>
|
76 |
|
|
<td class="col-xs-3">
|
77 |
48821
|
alessia.ba
|
<strong>Resource types</strong>
|
78 |
48767
|
alessia.ba
|
</td>
|
79 |
|
|
<td>
|
80 |
48821
|
alessia.ba
|
<xsl:for-each-group select="//rdf:Description"
|
81 |
|
|
group-by="./rdf:type/@rdf:resource">
|
82 |
|
|
<i><xsl:value-of
|
83 |
|
|
select="tokenize(current-grouping-key(), '/')[last()]"
|
84 |
|
|
/></i> (<xsl:value-of select="count(current-group())"/>) --
|
85 |
48767
|
alessia.ba
|
</xsl:for-each-group>
|
86 |
46254
|
alessia.ba
|
</td>
|
87 |
|
|
</tr>
|
88 |
|
|
</tbody>
|
89 |
|
|
</table>
|
90 |
48821
|
alessia.ba
|
<h6><span class="glyphicon glyphicon-align-left"/> MINIMAL METADATA </h6>
|
91 |
|
|
<table class="table">
|
92 |
|
|
<tbody>
|
93 |
|
|
<xsl:for-each-group select="//rdf:Description"
|
94 |
|
|
group-by="./rdf:type/@rdf:resource">
|
95 |
|
|
<xsl:for-each select="current-group()">
|
96 |
|
|
<xsl:apply-templates select="." mode="minimalMetadata"/>
|
97 |
|
|
</xsl:for-each>
|
98 |
|
|
</xsl:for-each-group>
|
99 |
|
|
</tbody>
|
100 |
|
|
</table>
|
101 |
46254
|
alessia.ba
|
</div>
|
102 |
|
|
</div>
|
103 |
|
|
|
104 |
48821
|
alessia.ba
|
<xsl:for-each select="//*[local-name() = 'record']">
|
105 |
|
|
<h6><span class="glyphicon glyphicon-wrench"/> INDEXED RECORD </h6>
|
106 |
46254
|
alessia.ba
|
<xsl:call-template name="xmlItem">
|
107 |
|
|
<xsl:with-param name="indent" select="string('')"/>
|
108 |
|
|
</xsl:call-template>
|
109 |
|
|
</xsl:for-each>
|
110 |
|
|
</xsl:template>
|
111 |
|
|
|
112 |
48821
|
alessia.ba
|
<!--
|
113 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E41_Appellation']" />
|
114 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E35_Title']" />
|
115 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E65_Creation']" />
|
116 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E30_Right']" />
|
117 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E52_Time-Span']" />
|
118 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E51_Contact_Point']" />
|
119 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.cidoc-crm.org/cidoc-crm/E45_Address']" />
|
120 |
|
|
<xsl:template mode="minimalMetadata" match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/PE29_Access_Point']" />
|
121 |
|
|
-->
|
122 |
|
|
<xsl:template mode="minimalMetadata" match="text()" />
|
123 |
|
|
|
124 |
|
|
<!--http://parthenos.d4science.org/CRMext/CRMpe.rdfs/PE22_Persistent_Dataset-->
|
125 |
|
|
<xsl:template mode="minimalMetadata"
|
126 |
|
|
match="rdf:Description[./rdf:type/@rdf:resource = 'http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/PE22_Persistent_Dataset']">
|
127 |
|
|
<br/>
|
128 |
|
|
<tr>
|
129 |
48822
|
alessia.ba
|
<td>
|
130 |
|
|
<strong>PE22_Persistent_Dataset</strong> : <strong><xsl:value-of select="./@rdf:about"/></strong><br/>
|
131 |
48821
|
alessia.ba
|
|
132 |
|
|
<xsl:call-template name="printProperty">
|
133 |
|
|
<xsl:with-param name="propertyName">P1_is_identified_by</xsl:with-param>
|
134 |
|
|
<xsl:with-param name="propertyValue">
|
135 |
|
|
<xsl:value-of select="./crm:P1_is_identified_by/@rdf:resource"/>
|
136 |
|
|
</xsl:with-param>
|
137 |
|
|
</xsl:call-template>
|
138 |
|
|
<br/>
|
139 |
|
|
<xsl:call-template name="printProperty">
|
140 |
|
|
<xsl:with-param name="propertyName">P102_has_title</xsl:with-param>
|
141 |
|
|
<xsl:with-param name="propertyValue">
|
142 |
|
|
<xsl:value-of
|
143 |
|
|
select="//rdf:Description[@rdf:about = ./crm:P102_has_title/@rdf:resource]/rdfs:label"
|
144 |
|
|
/>
|
145 |
|
|
</xsl:with-param>
|
146 |
|
|
</xsl:call-template>
|
147 |
|
|
<br/>
|
148 |
|
|
<xsl:call-template name="printProperty">
|
149 |
|
|
<xsl:with-param name="propertyName">P2_has_type</xsl:with-param>
|
150 |
|
|
<xsl:with-param name="propertyValue">
|
151 |
|
|
<xsl:value-of
|
152 |
|
|
select="//rdf:Description[@rdf:about = ./crm:P2_has_type/@rdf:resource]/rdfs:label"
|
153 |
|
|
/>
|
154 |
|
|
</xsl:with-param>
|
155 |
|
|
</xsl:call-template>
|
156 |
|
|
<br/>
|
157 |
|
|
<xsl:call-template name="printProperty">
|
158 |
|
|
<xsl:with-param name="propertyName">P3_has_note</xsl:with-param>
|
159 |
|
|
<xsl:with-param name="propertyValue">
|
160 |
|
|
<xsl:value-of select="./crm:P3_has_note"/>
|
161 |
|
|
</xsl:with-param>
|
162 |
|
|
</xsl:call-template>
|
163 |
|
|
<br/>
|
164 |
|
|
<xsl:call-template name="printProperty">
|
165 |
|
|
<xsl:with-param name="propertyName">P129_is_about</xsl:with-param>
|
166 |
|
|
<xsl:with-param name="propertyValue">
|
167 |
|
|
<xsl:value-of select="./crm:P129_is_about/@rdf:resource"/>
|
168 |
|
|
</xsl:with-param>
|
169 |
|
|
</xsl:call-template>
|
170 |
|
|
<br/>
|
171 |
|
|
<xsl:call-template name="printProperty">
|
172 |
|
|
<xsl:with-param name="propertyName">P67_refers_to</xsl:with-param>
|
173 |
|
|
<xsl:with-param name="propertyValue">
|
174 |
|
|
<xsl:value-of select="./crm:P67_refers_to/@rdf:resource"/>
|
175 |
|
|
</xsl:with-param>
|
176 |
|
|
</xsl:call-template>
|
177 |
|
|
<br/>
|
178 |
|
|
<xsl:call-template name="printProperty">
|
179 |
|
|
<xsl:with-param name="propertyName">PP8i_is_dataset_hosted_by</xsl:with-param>
|
180 |
|
|
<xsl:with-param name="propertyValue">
|
181 |
|
|
<xsl:value-of select="./crm:PP8i_is_dataset_hosted_by/@rdf:resource"/>
|
182 |
|
|
</xsl:with-param>
|
183 |
|
|
</xsl:call-template>
|
184 |
|
|
<br/>
|
185 |
|
|
<xsl:call-template name="printProperty">
|
186 |
|
|
<xsl:with-param name="propertyName"
|
187 |
|
|
>PP6i_is_digital_object_hosted_by</xsl:with-param>
|
188 |
|
|
<xsl:with-param name="propertyValue">
|
189 |
|
|
<xsl:value-of select="./crm:PP6i_is_digital_object_hosted_by/@rdf:resource"/>
|
190 |
|
|
</xsl:with-param>
|
191 |
|
|
</xsl:call-template>
|
192 |
|
|
<br/>
|
193 |
|
|
<xsl:call-template name="printProperty">
|
194 |
|
|
<xsl:with-param name="propertyName">PP4i_is_object_hosted_by</xsl:with-param>
|
195 |
|
|
<xsl:with-param name="propertyValue">
|
196 |
|
|
<xsl:value-of select="./crm:PP4i_is_object_hosted_by/@rdf:resource"/>
|
197 |
|
|
</xsl:with-param>
|
198 |
|
|
</xsl:call-template>
|
199 |
|
|
</td>
|
200 |
|
|
</tr>
|
201 |
|
|
|
202 |
|
|
</xsl:template>
|
203 |
|
|
|
204 |
|
|
<xsl:template name="printProperty">
|
205 |
|
|
<xsl:param name="propertyName"/>
|
206 |
|
|
<xsl:param name="propertyValue"/>
|
207 |
|
|
<xsl:value-of select="concat($propertyName, ' : ', $propertyValue)"/>
|
208 |
|
|
</xsl:template>
|
209 |
|
|
|
210 |
46254
|
alessia.ba
|
<xsl:template name="xmlAttr">
|
211 |
48821
|
alessia.ba
|
<span style="color:orange">
|
212 |
46254
|
alessia.ba
|
<xsl:value-of select="concat(' ', local-name())"/>
|
213 |
|
|
</span>
|
214 |
|
|
<xsl:value-of select="concat('="', ., '"')"/>
|
215 |
|
|
</xsl:template>
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
<xsl:template name="xmlItem">
|
219 |
|
|
<xsl:param name="indent"/>
|
220 |
46368
|
alessia.ba
|
<xsl:variable name="tag" select="name()"/>
|
221 |
48821
|
alessia.ba
|
<xsl:variable name="newindent"><xsl:value-of select="$indent"/>     </xsl:variable>
|
222 |
46254
|
alessia.ba
|
|
223 |
|
|
<xsl:if test="string-length($tag)">
|
224 |
|
|
<br/>
|
225 |
|
|
<xsl:value-of select="$indent"/>
|
226 |
48821
|
alessia.ba
|
<span style="color:blue">
|
227 |
|
|
<xsl:value-of select="concat('<', $tag)"/>
|
228 |
46254
|
alessia.ba
|
</span>
|
229 |
|
|
<xsl:for-each select="@*">
|
230 |
|
|
<xsl:call-template name="xmlAttr"/>
|
231 |
|
|
</xsl:for-each>
|
232 |
|
|
<xsl:choose>
|
233 |
|
|
<xsl:when test="count(child::*) = 0 and count(child::text()) = 1">
|
234 |
48821
|
alessia.ba
|
<span style="color:blue">></span>
|
235 |
46254
|
alessia.ba
|
<xsl:value-of select="normalize-space(.)"/>
|
236 |
48821
|
alessia.ba
|
<span style="color:blue">
|
237 |
|
|
<xsl:value-of select="concat('</', $tag, '>')"/>
|
238 |
46254
|
alessia.ba
|
</span>
|
239 |
|
|
</xsl:when>
|
240 |
|
|
<xsl:when test="count(child::* | child::text()) > 0">
|
241 |
48821
|
alessia.ba
|
<span style="color:blue">></span>
|
242 |
46254
|
alessia.ba
|
<xsl:for-each select="child::* | child::text()">
|
243 |
|
|
<xsl:choose>
|
244 |
48821
|
alessia.ba
|
<xsl:when
|
245 |
|
|
test="self::text() and string-length(normalize-space(.)) > 0">
|
246 |
46254
|
alessia.ba
|
<xsl:value-of select="normalize-space(.)"/>
|
247 |
|
|
</xsl:when>
|
248 |
|
|
<xsl:otherwise>
|
249 |
|
|
<xsl:call-template name="xmlItem">
|
250 |
|
|
<xsl:with-param name="indent" select="$newindent"/>
|
251 |
|
|
</xsl:call-template>
|
252 |
|
|
</xsl:otherwise>
|
253 |
|
|
</xsl:choose>
|
254 |
|
|
</xsl:for-each>
|
255 |
|
|
<br/>
|
256 |
|
|
<xsl:value-of select="$indent"/>
|
257 |
48821
|
alessia.ba
|
<span style="color:blue">
|
258 |
|
|
<xsl:value-of select="concat('</', $tag, '>')"/>
|
259 |
46254
|
alessia.ba
|
</span>
|
260 |
|
|
</xsl:when>
|
261 |
|
|
<xsl:otherwise>
|
262 |
48821
|
alessia.ba
|
<span style="color:blue"> /></span>
|
263 |
46254
|
alessia.ba
|
</xsl:otherwise>
|
264 |
|
|
</xsl:choose>
|
265 |
|
|
</xsl:if>
|
266 |
|
|
</xsl:template>
|
267 |
|
|
|
268 |
48821
|
alessia.ba
|
<!--
|
269 |
|
|
Suppress warning messages "The source document is in no namespace, but the template rules
|
270 |
|
|
all expect elements in a namespace" (see https://github.com/daisy/pipeline-mod-braille/issues/38)
|
271 |
|
|
-->
|
272 |
|
|
<xsl:template match="/phony">
|
273 |
|
|
<xsl:next-match/>
|
274 |
|
|
</xsl:template>
|
275 |
46254
|
alessia.ba
|
|
276 |
48821
|
alessia.ba
|
|
277 |
46254
|
alessia.ba
|
</xsl:stylesheet>
|