forked from geosolutions-it/schema-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-thumbnail.xsl
129 lines (111 loc) · 5.09 KB
/
set-thumbnail.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?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="/root">
<xsl:apply-templates select="mcp:MD_Metadata"/>
</xsl:template>
<!-- ================================================================= -->
<xsl:template match="mcp:MD_Metadata">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="gmd:fileIdentifier"/>
<xsl:apply-templates select="gmd:language"/>
<xsl:apply-templates select="gmd:characterSet"/>
<xsl:apply-templates select="gmd:parentIdentifier"/>
<xsl:apply-templates select="gmd:hierarchyLevel"/>
<xsl:apply-templates select="gmd:hierarchyLevelName"/>
<xsl:apply-templates select="gmd:contact"/>
<xsl:apply-templates select="gmd:dateStamp"/>
<xsl:apply-templates select="gmd:metadataStandardName"/>
<xsl:apply-templates select="gmd:metadataStandardVersion"/>
<xsl:apply-templates select="gmd:dataSetURI"/>
<xsl:apply-templates select="gmd:locale"/>
<xsl:apply-templates select="gmd:spatialRepresentationInfo"/>
<xsl:apply-templates select="gmd:referenceSystemInfo"/>
<xsl:apply-templates select="gmd:metadataExtensionInfo"/>
<xsl:choose>
<xsl:when test="not(gmd:identificationInfo)">
<gmd:identificationInfo>
<mcp:MD_DataIdentification gco:isoType="gmd:MD_DataIdentification">
<xsl:call-template name="fill"/>
</mcp:MD_DataIdentification>
</gmd:identificationInfo>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="gmd:identificationInfo"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="gmd:contentInfo"/>
<xsl:apply-templates select="gmd:distributionInfo"/>
<xsl:apply-templates select="gmd:dataQualityInfo"/>
<xsl:apply-templates select="gmd:portrayalCatalogueInfo"/>
<xsl:apply-templates select="gmd:metadataConstraints"/>
<xsl:apply-templates select="gmd:applicationSchemaInfo"/>
<xsl:apply-templates select="gmd:metadataMaintenance"/>
<xsl:apply-templates select="gmd:series"/>
<xsl:apply-templates select="gmd:describes"/>
<xsl:apply-templates select="gmd:propertyType"/>
<xsl:apply-templates select="gmd:featureType"/>
<xsl:apply-templates select="gmd:featureAttribute"/>
<xsl:apply-templates select="mcp:revisionDate"/>
</xsl:copy>
</xsl:template>
<!-- ================================================================= -->
<xsl:template match="mcp:MD_DataIdentification">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="gmd:citation"/>
<xsl:apply-templates select="gmd:abstract"/>
<xsl:apply-templates select="gmd:purpose"/>
<xsl:apply-templates select="gmd:credit"/>
<xsl:apply-templates select="gmd:status"/>
<xsl:apply-templates select="gmd:pointOfContact"/>
<xsl:apply-templates select="gmd:resourceMaintenance"/>
<xsl:apply-templates select="gmd:graphicOverview[gmd:MD_BrowseGraphic/gmd:fileDescription/gco:CharacterString != /root/env/type]"/>
<xsl:call-template name="fill"/>
<xsl:apply-templates select="gmd:resourceFormat"/>
<xsl:apply-templates select="gmd:descriptiveKeywords"/>
<xsl:apply-templates select="gmd:resourceSpecificUsage"/>
<xsl:apply-templates select="gmd:resourceConstraints"/>
<xsl:apply-templates select="gmd:aggregationInfo"/>
<xsl:apply-templates select="gmd:spatialRepresentationType"/>
<xsl:apply-templates select="gmd:spatialResolution"/>
<xsl:apply-templates select="gmd:language"/>
<xsl:apply-templates select="gmd:characterSet"/>
<xsl:apply-templates select="gmd:topicCategory"/>
<xsl:apply-templates select="gmd:environmentDescription"/>
<xsl:apply-templates select="gmd:extent"/>
<xsl:apply-templates select="gmd:supplementalInformation"/>
<xsl:apply-templates select="mcp:samplingFrequency"/>
<xsl:apply-templates select="mcp:sensor"/>
<xsl:apply-templates select="mcp:sensorCalibrationProcess"/>
<xsl:apply-templates select="mcp:dataParameters"/>
</xsl:copy>
</xsl:template>
<!-- ================================================================= -->
<xsl:template name="fill">
<gmd:graphicOverview>
<gmd:MD_BrowseGraphic>
<gmd:fileName>
<gco:CharacterString><xsl:value-of select="/root/env/file"/></gco:CharacterString>
</gmd:fileName>
<gmd:fileDescription>
<gco:CharacterString><xsl:value-of select="/root/env/type"/></gco:CharacterString>
</gmd:fileDescription>
<gmd:fileType>
<gco:CharacterString><xsl:value-of select="/root/env/ext"/></gco:CharacterString>
</gmd:fileType>
</gmd:MD_BrowseGraphic>
</gmd:graphicOverview>
</xsl:template>
<!-- ================================================================= -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- ================================================================= -->
</xsl:stylesheet>