forked from GeoViQua/geoviqua-geonetwork-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extract-thumbnails.xsl
32 lines (29 loc) · 1.39 KB
/
extract-thumbnails.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gvq="http://www.geoviqua.org/QualityInformationModel/4.0">
<xsl:template match="gvq:GVQ_Metadata">
<thumbnail>
<xsl:for-each select="gmd:identificationInfo/gvq:GVQ_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic
|gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic
|gmd:identificationInfo/*[@gco:isoType='gvq:GVQ_DataIdentification']/gmd:graphicOverview/gmd:MD_BrowseGraphic
|gmd:identificationInfo/*[@gco:isoType='srv:SV_ServiceIdentification']/gmd:graphicOverview/gmd:MD_BrowseGraphic
">
<xsl:choose>
<xsl:when test="gmd:fileDescription/gco:CharacterString = 'large_thumbnail' and gmd:fileName/gco:CharacterString != ''">
<large>
<xsl:value-of select="gmd:fileName/gco:CharacterString" />
</large>
</xsl:when>
<xsl:when test="gmd:fileDescription/gco:CharacterString = 'thumbnail' and gmd:fileName/gco:CharacterString != ''">
<small>
<xsl:value-of select="gmd:fileName/gco:CharacterString" />
</small>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</thumbnail>
</xsl:template>
</xsl:stylesheet>