Project

General

Profile

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>D-Net identifier: </strong><i><xsl:value-of select="//dri:objIdentifier" /></i><br/>
44
						<strong>Original identifier: </strong><i><xsl:value-of select="//dri:recordIdentifier" /></i><br/>
45
						<strong>Data Source: </strong><i><xsl:value-of select="//dri:datasourcename" /></i><br/>
46
						<strong>Data Source API: </strong><i><xsl:value-of select="//dri:datasourceapi" /></i><br/>
47
						<strong>Resource types: </strong>
48
						<xsl:for-each-group select="//rdf:Description" group-by="./rdf:type/@rdf:resource">
49
							<i><xsl:value-of select="tokenize(current-grouping-key(), '/')[last()]"
50
							/></i> (<xsl:value-of select="count(current-group())"/>) --
51
						</xsl:for-each-group>
52
						<br />
53
						<strong>Notes: </strong><xsl:for-each select="//crm:P3_has_note"><i><xsl:value-of select="." /></i><br/></xsl:for-each><br/>
54
						<br />
55
						<button class="btn btn-primary btn-sm" ng-click="getDocument('objidentifier', '{$id}')">show record</button>
56
					</td>
57
				</tr>
58
			</table>
59
		</div>
60
	</xsl:template>
61

    
62
</xsl:stylesheet>
(2-2/2)