Project

General

Profile

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" version="1.0" 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 manifestation'">
23
								<img src="../resources/img/eagle/doc.png" width="80" height="80" />
24
							</xsl:when>
25
							<xsl:when test="$type = 'Visual representation'">
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>
(4-4/4)