1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
|
3
|
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
|
4
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
5
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
6
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
7
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
9
|
xmlns:foaf="http://xmlns.com/foaf/0.1/">
|
10
|
|
11
|
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
|
12
|
|
13
|
<xsl:template match="/">
|
14
|
<xsl:variable name="id" select="//*[local-name() = 'objIdentifier']" />
|
15
|
|
16
|
<div class="well">
|
17
|
<xsl:if test="//dri:invalid">
|
18
|
<div class="well"><strong>The record contains the following uncleaned fields</strong>
|
19
|
<table class="table table-condensed bg-danger">
|
20
|
<thead>
|
21
|
<tr>
|
22
|
<th>XPath</th><th>Value</th><th>Vocabulary</th>
|
23
|
</tr>
|
24
|
</thead>
|
25
|
<tbody>
|
26
|
<xsl:for-each select="//dri:invalid/dri:error">
|
27
|
<tr>
|
28
|
<td><xsl:value-of select="./@xpath" /></td>
|
29
|
<td><xsl:value-of select="./@term" /></td>
|
30
|
<td><xsl:value-of select="./@vocabularies" /></td>
|
31
|
</tr>
|
32
|
</xsl:for-each>
|
33
|
</tbody>
|
34
|
</table>
|
35
|
</div>
|
36
|
</xsl:if>
|
37
|
<table>
|
38
|
<tr>
|
39
|
<td style="width: 120px">
|
40
|
<img src="../resources/img/record.png" width="80" height="80" />
|
41
|
</td>
|
42
|
<td>
|
43
|
<strong>Original identifier: </strong><i><xsl:value-of select="//dri:recordIdentifier" /></i><br/><br/>
|
44
|
<strong>Data Source: </strong><i><xsl:value-of select="//dri:datasourcename" /></i><br/><br/>
|
45
|
<strong>Resource types: </strong>
|
46
|
<xsl:for-each-group select="//rdf:Description" group-by="./rdf:type/@rdf:resource">
|
47
|
<i><xsl:value-of select="tokenize(current-grouping-key(),'/')[last()]"/></i> (<xsl:value-of select="count(current-group())"/>)<br/>
|
48
|
</xsl:for-each-group>
|
49
|
|
50
|
<!--<xsl:for-each select="//rdf:Description/rdf:type"><i><xsl:value-of select="tokenize(@rdf:resource,'/')[last()]" /></i><br/></xsl:for-each><br/>-->
|
51
|
|
52
|
<!--<xsl:value-of select="//rdf:RDF/*/crm:P102_has_title/crm:E35_Title/rdfs:label" /><br/>-->
|
53
|
|
54
|
<strong>Notes: </strong><xsl:for-each select="//crm:P3_has_note"><i><xsl:value-of select="." /></i><br/></xsl:for-each><br/>
|
55
|
<br />
|
56
|
<button class="btn btn-primary btn-sm" ng-click="getDocument('objidentifier', '{$id}')">show record</button>
|
57
|
</td>
|
58
|
</tr>
|
59
|
</table>
|
60
|
</div>
|
61
|
</xsl:template>
|
62
|
|
63
|
</xsl:stylesheet>
|