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/" xmlns:dri="http://www.driver-repository.eu/namespace/dri">
4

    
5
	<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
6

    
7
	<xsl:template match="/">
8
		<xsl:variable name="id"   select="//*[local-name() = 'objIdentifier']" />
9

    
10

    
11

    
12
		<div class="well">
13
			<xsl:if test="//dri:invalid">
14
				<div class="well"><strong>The record contains the following uncleaned fields</strong>
15
					<table class="table table-condensed bg-danger">
16
						<thead>
17
						<tr>
18
							<th>XPath</th><th>Value</th><th>Vocabulary</th>
19
						</tr>
20
						</thead>
21
						<tbody>
22
						<xsl:for-each select="//dri:invalid/dri:error">
23
							<tr>
24
								<td><xsl:value-of select="./@xpath" /></td>
25
								<td><xsl:value-of select="./@term" /></td>
26
								<td><xsl:value-of select="./@vocabularies" /></td>
27
							</tr>
28
						</xsl:for-each>
29
						</tbody>
30
					</table>
31
				</div>
32
			</xsl:if>
33
			<table>
34
				<tr>
35
					<td style="width: 120px">
36
						<img src="../resources/img/record.png" width="80" height="80" />
37
					</td>
38
					<td>
39
						<strong>Title: </strong><xsl:value-of select="//crm:P102_has_title" /><br/>
40

    
41
						<strong>Notes: </strong><xsl:for-each select="//crm:P3_has_note"><i><xsl:value-of select="." /></i></xsl:for-each><br/>
42
						<strong>Author: </strong><xsl:value-of select="//*[local-name()='creator']" /><br/>
43
						<br />
44
						<button class="btn btn-primary btn-sm" ng-click="getDocument('objidentifier', '{$id}')">show record</button>
45
					</td>
46
				</tr>
47
			</table>
48
		</div>
49
	</xsl:template>
50

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