Revision 3327
Added by barteau over 17 years ago
lib/style/common/fgdc/fgdc_1.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
|
3 |
<xsl:output indent="yes" method="html"/> |
|
4 |
<xsl:param name="docid"/> |
|
5 |
|
|
6 |
<xsl:template match="/metadata"> |
|
7 |
<html> |
|
8 |
<head> |
|
9 |
<title>FGDC Identification and Metacat Data Package Information</title> |
|
10 |
</head> |
|
11 |
<body> |
|
12 |
<xsl:apply-templates select="idinfo"/> |
|
13 |
<xsl:apply-templates select="distinfo/resdesc[text()=$docid]/ancestor::distinfo"/> |
|
14 |
</body> |
|
15 |
</html> |
|
16 |
</xsl:template> |
|
17 |
|
|
18 |
<xsl:template match="idinfo"> |
|
19 |
<table width="700" border="0" cellspacing="10"> |
|
20 |
<tr> |
|
21 |
<td colspan="2" align="center"><b>FGDC Identification Information</b></td> |
|
22 |
</tr> |
|
23 |
<xsl:apply-templates select="citation"/> |
|
24 |
<xsl:apply-templates select="descript"/> |
|
25 |
<xsl:apply-templates select="spdom"/> |
|
26 |
<xsl:apply-templates select="keywords"/> |
|
27 |
</table> |
|
28 |
</xsl:template> |
|
29 |
|
|
30 |
<xsl:template match="citation"> |
|
31 |
<xsl:apply-templates select="citeinfo"/> |
|
32 |
</xsl:template> |
|
33 |
|
|
34 |
<xsl:template match="citeinfo"> |
|
35 |
<tr> |
|
36 |
<td colspan="2"><b>Citation Information </b></td> |
|
37 |
</tr> |
|
38 |
|
|
39 |
<tr> |
|
40 |
<xsl:apply-templates select="title"/> |
|
41 |
</tr> |
|
42 |
<tr> |
|
43 |
<xsl:apply-templates select="origin"/> |
|
44 |
</tr> |
|
45 |
<tr> |
|
46 |
<xsl:apply-templates select="pubdate"/> |
|
47 |
</tr> |
|
48 |
<tr> |
|
49 |
<xsl:apply-templates select="edition"/> |
|
50 |
</tr> |
|
51 |
<tr> |
|
52 |
<xsl:apply-templates select="geoform"/> |
|
53 |
</tr> |
|
54 |
<tr> |
|
55 |
<xsl:apply-templates select="pubinfo"/> |
|
56 |
</tr> |
|
57 |
<tr> |
|
58 |
<xsl:apply-templates select="othercit"/> |
|
59 |
</tr> |
|
60 |
</xsl:template> |
|
61 |
|
|
62 |
<xsl:template match="descript"> |
|
63 |
<tr> |
|
64 |
<td colspan="2"><b>Description</b></td> |
|
65 |
</tr> |
|
66 |
<tr> |
|
67 |
<xsl:apply-templates select="abstract"/> |
|
68 |
</tr> |
|
69 |
<tr> |
|
70 |
<xsl:apply-templates select="purpose"/> |
|
71 |
</tr> |
|
72 |
</xsl:template> |
|
73 |
|
|
74 |
<xsl:template match="spdom"> |
|
75 |
<tr> |
|
76 |
<xsl:apply-templates select="bounding"/> |
|
77 |
</tr> |
|
78 |
</xsl:template> |
|
79 |
|
|
80 |
<xsl:template match="keywords"> |
|
81 |
<tr> |
|
82 |
<xsl:apply-templates select="theme"/> |
|
83 |
</tr> |
|
84 |
<tr> |
|
85 |
<xsl:apply-templates select="place"/> |
|
86 |
</tr> |
|
87 |
</xsl:template> |
|
88 |
|
|
89 |
<xsl:template match="theme"> |
|
90 |
<td valign="top">Theme Keywords</td> |
|
91 |
<td> |
|
92 |
<xsl:apply-templates select="themekey[position()!=last()]"> |
|
93 |
<xsl:with-param name="lastPlace">f</xsl:with-param> |
|
94 |
</xsl:apply-templates> |
|
95 |
<xsl:apply-templates select="themekey[position()=last()]"> |
|
96 |
<xsl:with-param name="lastPlace">t</xsl:with-param> |
|
97 |
</xsl:apply-templates> |
|
98 |
</td> |
|
99 |
</xsl:template> |
|
100 |
|
|
101 |
<xsl:template match="place"> |
|
102 |
<td valign="top">Place Keywords</td> |
|
103 |
<td> |
|
104 |
<xsl:apply-templates select="placekey[position()!=last()]"> |
|
105 |
<xsl:with-param name="lastPlace">f</xsl:with-param> |
|
106 |
</xsl:apply-templates> |
|
107 |
<xsl:apply-templates select="placekey[position()=last()]"> |
|
108 |
<xsl:with-param name="lastPlace">t</xsl:with-param> |
|
109 |
</xsl:apply-templates> |
|
110 |
</td> |
|
111 |
</xsl:template> |
|
112 |
|
|
113 |
<xsl:template match="themekey"> |
|
114 |
<xsl:param name="lastPlace"/> |
|
115 |
<xsl:value-of select="."/> |
|
116 |
<xsl:if test="$lastPlace = 'f'">, </xsl:if> |
|
117 |
</xsl:template> |
|
118 |
|
|
119 |
<xsl:template match="placekey"> |
|
120 |
<xsl:param name="lastPlace"/> |
|
121 |
<xsl:value-of select="."/> |
|
122 |
<xsl:if test="$lastPlace = 'f'">, </xsl:if> |
|
123 |
</xsl:template> |
|
124 |
|
|
125 |
<xsl:template match="bounding"> |
|
126 |
<td valign="top">Bounding Coordinates</td> |
|
127 |
<td> |
|
128 |
<table> |
|
129 |
<tr> |
|
130 |
<td align="right">West</td> |
|
131 |
<td> |
|
132 |
<xsl:value-of select="westbc"/> |
|
133 |
</td> |
|
134 |
<td align="right">East</td> |
|
135 |
<td> |
|
136 |
<xsl:value-of select="eastbc"/> |
|
137 |
</td> |
|
138 |
</tr> |
|
139 |
<tr> |
|
140 |
<td align="right">North</td> |
|
141 |
<td> |
|
142 |
<xsl:value-of select="northbc"/> |
|
143 |
</td> |
|
144 |
<td align="right">South</td> |
|
145 |
<td> |
|
146 |
<xsl:value-of select="southbc"/> |
|
147 |
</td> |
|
148 |
</tr> |
|
149 |
</table> |
|
150 |
</td> |
|
151 |
</xsl:template> |
|
152 |
|
|
153 |
<xsl:template match="abstract"> |
|
154 |
<td valign="top">Abstract</td> |
|
155 |
<td> |
|
156 |
<xsl:value-of select="."/> |
|
157 |
</td> |
|
158 |
</xsl:template> |
|
159 |
|
|
160 |
<xsl:template match="purpose"> |
|
161 |
<td valign="top">Purpose</td> |
|
162 |
<td> |
|
163 |
<xsl:value-of select="."/> |
|
164 |
</td> |
|
165 |
</xsl:template> |
|
166 |
|
|
167 |
<xsl:template match="title"> |
|
168 |
<td>Title</td> |
|
169 |
<td> |
|
170 |
<xsl:value-of select="."/> |
|
171 |
</td> |
|
172 |
</xsl:template> |
|
173 |
|
|
174 |
<xsl:template match="origin"> |
|
175 |
<td>Originator </td> |
|
176 |
<td> |
|
177 |
<xsl:value-of select="."/> |
|
178 |
</td> |
|
179 |
</xsl:template> |
|
180 |
|
|
181 |
<xsl:template match="pubdate"> |
|
182 |
<td>Publication Date</td> |
|
183 |
<td> |
|
184 |
<xsl:call-template name="long_date"> |
|
185 |
<xsl:with-param name="date"> |
|
186 |
<xsl:value-of select="."/> |
|
187 |
</xsl:with-param> |
|
188 |
</xsl:call-template> |
|
189 |
</td> |
|
190 |
</xsl:template> |
|
191 |
|
|
192 |
<xsl:template match="edition"> |
|
193 |
<td>Edition</td> |
|
194 |
<td> |
|
195 |
<xsl:value-of select="."/> |
|
196 |
</td> |
|
197 |
</xsl:template> |
|
198 |
|
|
199 |
<xsl:template match="geoform"> |
|
200 |
<td valign="top">Geospatial Data Presentation Form</td> |
|
201 |
<td> |
|
202 |
<xsl:value-of select="."/> |
|
203 |
</td> |
|
204 |
</xsl:template> |
|
205 |
|
|
206 |
<xsl:template match="othercit"> |
|
207 |
<td valign="top">Other Citation Details</td> |
|
208 |
<td> |
|
209 |
<xsl:value-of select="."/> |
|
210 |
</td> |
|
211 |
</xsl:template> |
|
212 |
|
|
213 |
<xsl:template match="pubinfo"> |
|
214 |
<td valign="top"> Publication Information </td> |
|
215 |
<td> |
|
216 |
<table> |
|
217 |
<tr> |
|
218 |
<xsl:apply-templates select="pubplace"/> |
|
219 |
</tr> |
|
220 |
<tr> |
|
221 |
<xsl:apply-templates select="publish"/> |
|
222 |
</tr> |
|
223 |
</table> |
|
224 |
</td> |
|
225 |
</xsl:template> |
|
226 |
|
|
227 |
<xsl:template match="pubplace"> |
|
228 |
<td>Publication Place</td> |
|
229 |
<td> |
|
230 |
<xsl:value-of select="."/> |
|
231 |
</td> |
|
232 |
</xsl:template> |
|
233 |
|
|
234 |
<xsl:template match="publish"> |
|
235 |
<td>Publisher</td> |
|
236 |
<td> |
|
237 |
<xsl:value-of select="."/> |
|
238 |
</td> |
|
239 |
</xsl:template> |
|
240 |
|
|
241 |
<xsl:template match="distinfo"> |
|
242 |
<table width="700" border="0" cellspacing="10"> |
|
243 |
<tr> |
|
244 |
<td colspan="3" align="center"><b>Metacat Data Package Information</b></td> |
|
245 |
</tr> |
|
246 |
<tr> |
|
247 |
<xsl:apply-templates select="resdesc"/> |
|
248 |
</tr> |
|
249 |
<xsl:apply-templates select="stdorder/digform/digtopt/onlinopt/computer/networka"/> |
|
250 |
</table> |
|
251 |
</xsl:template> |
|
252 |
|
|
253 |
<xsl:template match="resdesc"> |
|
254 |
<td>Resource Description</td> |
|
255 |
<td> |
|
256 |
<xsl:value-of select="."/> |
|
257 |
</td> |
|
258 |
<td> Update <input name="action" value="updateFile" type="file"/> |
|
259 |
</td> |
|
260 |
</xsl:template> |
|
261 |
|
|
262 |
<xsl:template match="networka"> |
|
263 |
<tr> |
|
264 |
<xsl:apply-templates select="networkr"/> |
|
265 |
</tr> |
|
266 |
</xsl:template> |
|
267 |
|
|
268 |
<xsl:template match="networkr"> |
|
269 |
<td>Network Resource Name</td> |
|
270 |
<td> |
|
271 |
<xsl:value-of select="."/> |
|
272 |
</td> |
|
273 |
<td> Update <input name="action" value="updateFile" type="file"/> |
|
274 |
</td> |
|
275 |
</xsl:template> |
|
276 |
|
|
277 |
<xsl:template name="long_date"> |
|
278 |
<xsl:param name="date"/> |
|
279 |
<!-- Day --> |
|
280 |
<xsl:value-of select="number(substring($date, 7, 2))"/> |
|
281 |
<xsl:text> </xsl:text> |
|
282 |
<!-- Month --> |
|
283 |
<xsl:variable name="month" select="number(substring($date, 5, 2))"/> |
|
284 |
<xsl:choose> |
|
285 |
<xsl:when test="$month=1">January</xsl:when> |
|
286 |
<xsl:when test="$month=2">February</xsl:when> |
|
287 |
<xsl:when test="$month=3">March</xsl:when> |
|
288 |
<xsl:when test="$month=4">April</xsl:when> |
|
289 |
<xsl:when test="$month=5">May</xsl:when> |
|
290 |
<xsl:when test="$month=6">June</xsl:when> |
|
291 |
<xsl:when test="$month=7">July</xsl:when> |
|
292 |
<xsl:when test="$month=8">August</xsl:when> |
|
293 |
<xsl:when test="$month=9">September</xsl:when> |
|
294 |
<xsl:when test="$month=10">October</xsl:when> |
|
295 |
<xsl:when test="$month=11">November</xsl:when> |
|
296 |
<xsl:when test="$month=12">December</xsl:when> |
|
297 |
<xsl:otherwise>INVALID MONTH</xsl:otherwise> |
|
298 |
</xsl:choose> |
|
299 |
<xsl:text> </xsl:text> |
|
300 |
<!-- Year --> |
|
301 |
<xsl:value-of select="substring($date, 1, 4)"/> |
|
302 |
</xsl:template> |
|
303 |
|
|
304 |
</xsl:stylesheet> |
|
0 | 305 |
Also available in: Unified diff
Initial checkin. Just a starting point for the FGDC Metadata xsl view.