forked from geosolutions-it/schema-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextract-thumbnails.xsl
27 lines (24 loc) · 1 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
<?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:mcp="http://schemas.aodn.org.au/mcp-2.0"
xmlns:gmd="http://www.isotc211.org/2005/gmd">
<xsl:template match="mcp:MD_Metadata">
<thumbnail>
<xsl:for-each select="gmd:identificationInfo/mcp:MD_DataIdentification/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>