1 |
10046
|
mecum
|
<?xml version="1.0"?>
|
2 |
|
|
<xsl:stylesheet
|
3 |
10159
|
mecum
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4 |
|
|
xmlns:gmd="http://www.isotc211.org/2005/gmd"
|
5 |
|
|
xmlns:gco="http://www.isotc211.org/2005/gco"
|
6 |
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">
|
7 |
|
|
<xsl:import href="iso-md.xsl"/>
|
8 |
|
|
<xsl:import href="iso-ci.xsl"/>
|
9 |
|
|
<xsl:import href="iso-ex.xsl"/>
|
10 |
|
|
<xsl:import href="iso-gco.xsl"/>
|
11 |
|
|
<xsl:import href="iso-gmd.xsl"/>
|
12 |
|
|
<xsl:import href="iso-gml.xsl"/>
|
13 |
|
|
<xsl:import href="iso-gmx.xsl"/>
|
14 |
|
|
<xsl:output method="html" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes" />
|
15 |
|
|
<!-- TODO: Figure out how to set the output method to get what I want -->
|
16 |
|
|
<!-- TODO: ^ Figure out what I want to output -->
|
17 |
|
|
<!-- TODO: Figuer out what this match statement should have in it -->
|
18 |
|
|
<!-- TODO: Cover gmd:identificationInfo/SV_ServiceIdentification -->
|
19 |
|
|
<xsl:template match="*[local-name()='MD_Metadata'] | *[local-name()='MI_Metadata']">
|
20 |
|
|
<form class="form-horizontal">
|
21 |
|
|
<div class="control-group entity">
|
22 |
|
|
<h4>General</h4>
|
23 |
|
|
<!-- fileIdentifier 1:1 -->
|
24 |
|
|
<div class="control-group">
|
25 |
|
|
<label class="control-label">Identifier</label>
|
26 |
|
|
<div class="controls">
|
27 |
|
|
<div class="controls-well">
|
28 |
|
|
<xsl:value-of select="//gmd:fileIdentifier/gco:CharacterString/text()" />
|
29 |
|
|
</div>
|
30 |
|
|
</div>
|
31 |
|
|
</div>
|
32 |
|
|
<!-- TODO: language 1:1 -->
|
33 |
|
|
<!-- TODO: characterSet 1:1 -->
|
34 |
|
|
<!-- Parent Identifier 1:1 conditional -->
|
35 |
|
|
<xsl:if test="//gmd:parentIdentifier">
|
36 |
|
|
<div class="control-group">
|
37 |
|
|
<label class="control-label">Parent Identifier</label>
|
38 |
|
|
<div class="controls">
|
39 |
|
|
<div class="controls-well">
|
40 |
|
|
<xsl:value-of select="//gmd:parentIdentifier/gco:CharacterString/text()" />
|
41 |
|
|
</div>
|
42 |
|
|
</div>
|
43 |
|
|
</div>
|
44 |
|
|
</xsl:if>
|
45 |
|
|
<!-- TODO: hierarchyLevel 0:inf -->
|
46 |
|
|
<!-- TODO: hierarchyLevelName 0:inf -->
|
47 |
|
|
<!-- Alternate identifier(s) 0:inf-->
|
48 |
|
|
<!-- gmd:identifier is an optional aprt of the CI_Citation element -->
|
49 |
|
|
<xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier">
|
50 |
|
|
<div class="control-group">
|
51 |
|
|
<label class="control-label">Cited Identifier</label>
|
52 |
|
|
<div class="controls">
|
53 |
|
|
<div class="controls-well">
|
54 |
|
|
<xsl:apply-templates />
|
55 |
|
|
</div>
|
56 |
|
|
</div>
|
57 |
|
|
</div>
|
58 |
|
|
</xsl:for-each>
|
59 |
|
|
<!-- Abstract 1:inf-->
|
60 |
|
|
<xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract">
|
61 |
|
|
<div class="control-group">
|
62 |
|
|
<label class="control-label">Abstract</label>
|
63 |
|
|
<div class="controls">
|
64 |
|
|
<div class="controls-well">
|
65 |
|
|
<xsl:apply-templates />
|
66 |
|
|
</div>
|
67 |
|
|
</div>
|
68 |
|
|
</div>
|
69 |
|
|
</xsl:for-each>
|
70 |
|
|
<!-- Publication (dateStamp) date 1:1 -->
|
71 |
|
|
<div class="control-group">
|
72 |
|
|
<label class="control-label">Publication Date</label>
|
73 |
|
|
<div class="controls">
|
74 |
|
|
<div class="controls-well">
|
75 |
|
|
<xsl:apply-templates select="//gmd:dateStamp" />
|
76 |
|
|
</div>
|
77 |
|
|
</div>
|
78 |
|
|
</div>
|
79 |
|
|
<!-- Topic Categories -->
|
80 |
|
|
<xsl:if test="//gmd:topicCategory">
|
81 |
|
|
<div class="control-group">
|
82 |
|
|
<label class="control-label">Topic Categories</label>
|
83 |
|
|
<div class="controls">
|
84 |
|
|
<div class="controls-well">
|
85 |
|
|
<table class="table table-condensed">
|
86 |
|
|
<thead>
|
87 |
|
|
<tr>
|
88 |
|
|
<th>Topic</th>
|
89 |
|
|
</tr>
|
90 |
|
|
</thead>
|
91 |
|
|
<tbody>
|
92 |
|
|
<xsl:for-each select="//gmd:topicCategory">
|
93 |
|
|
<tr>
|
94 |
|
|
<td>
|
95 |
|
|
<xsl:apply-templates />
|
96 |
|
|
</td>
|
97 |
|
|
</tr>
|
98 |
|
|
</xsl:for-each>
|
99 |
|
|
</tbody>
|
100 |
|
|
</table>
|
101 |
|
|
</div>
|
102 |
|
|
</div>
|
103 |
|
|
</div>
|
104 |
|
|
</xsl:if>
|
105 |
|
|
<!-- Keywords
|
106 |
10046
|
mecum
|
|
107 |
10056
|
mecum
|
Each <gmd:descriptiveKeywords> block should have one or more keywords in it
|
108 |
|
|
with one thesaurus. So we render keywords from the same thesaurus together.
|
109 |
|
|
-->
|
110 |
10159
|
mecum
|
<xsl:if test="//gmd:descriptiveKeywords">
|
111 |
|
|
<div class="control-group">
|
112 |
|
|
<label class="control-label">Descriptive Keywords</label>
|
113 |
|
|
<div class="controls">
|
114 |
|
|
<div class="controls-well">
|
115 |
|
|
<xsl:for-each select="//gmd:descriptiveKeywords">
|
116 |
|
|
<xsl:apply-templates />
|
117 |
|
|
</xsl:for-each>
|
118 |
|
|
</div>
|
119 |
|
|
</div>
|
120 |
|
|
</div>
|
121 |
|
|
</xsl:if>
|
122 |
10056
|
mecum
|
</div>
|
123 |
10159
|
mecum
|
<div class="control-group entity">
|
124 |
|
|
<h4>People and Associated Parties</h4>
|
125 |
|
|
<!-- Metadata Contact(s) 1:inf -->
|
126 |
|
|
<div class="control-group">
|
127 |
|
|
<label class="control-label">Metadata Contact(s)</label>
|
128 |
|
|
<div class="controls">
|
129 |
|
|
<div class="controls-well">
|
130 |
|
|
<xsl:for-each select="//gmd:contact">
|
131 |
|
|
<xsl:apply-templates />
|
132 |
|
|
</xsl:for-each>
|
133 |
|
|
</div>
|
134 |
|
|
</div>
|
135 |
|
|
</div>
|
136 |
|
|
<!-- Data Set Contact(s) -->
|
137 |
|
|
<div class="control-group">
|
138 |
|
|
<label class="control-label">Data Set Contacts</label>
|
139 |
|
|
<div class="controls">
|
140 |
|
|
<div class="controls-well">
|
141 |
|
|
<xsl:apply-templates select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact" />
|
142 |
|
|
</div>
|
143 |
|
|
</div>
|
144 |
|
|
</div>
|
145 |
|
|
<!-- Cited responsible parties-->
|
146 |
|
|
<div class="control-group">
|
147 |
|
|
<label class="control-label">Associated Parties</label>
|
148 |
|
|
<div class="controls">
|
149 |
|
|
<div class="controls-well">
|
150 |
|
|
<xsl:apply-templates select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty" />
|
151 |
|
|
</div>
|
152 |
|
|
</div>
|
153 |
|
|
</div>
|
154 |
|
|
</div>
|
155 |
|
|
<!-- TODO: otherEntities? -->
|
156 |
|
|
<!-- Extent (geographic, temporal, vertical) -->
|
157 |
|
|
<xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent">
|
158 |
10056
|
mecum
|
<xsl:apply-templates />
|
159 |
10159
|
mecum
|
</xsl:for-each>
|
160 |
|
|
<!-- TODO Methods -->
|
161 |
|
|
<div class="control-group entity">
|
162 |
|
|
<h4>Other Information</h4>
|
163 |
|
|
<!-- Data usage rights (resourceConstraints) -->
|
164 |
|
|
<xsl:if test="//gmd:resourceConstraints">
|
165 |
|
|
<xsl:for-each select="//gmd:resourceConstraints">
|
166 |
|
|
<xsl:apply-templates />
|
167 |
|
|
</xsl:for-each>
|
168 |
|
|
</xsl:if>
|
169 |
10046
|
mecum
|
</div>
|
170 |
10159
|
mecum
|
</form>
|
171 |
|
|
</xsl:template>
|
172 |
|
|
<!-- General, high-level templates -->
|
173 |
|
|
<!-- TODO: Figure out how to do this: I want to capture the scenario where
|
174 |
|
|
an element like gmd:individualName has no child gco:CharacterString or
|
175 |
10059
|
mecum
|
equivalent but has a nilReason attribute. -->
|
176 |
10159
|
mecum
|
<xsl:template match="*[not(*) and ./@nilReason]"> nilReason!
|
177 |
|
|
<xsl:value-of select="@nilReason" />
|
178 |
|
|
</xsl:template>
|
179 |
10046
|
mecum
|
</xsl:stylesheet>
|