Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
[working/Evergreen.git] / Open-ILS / xsl / MARC21slim2FGDC.xsl
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">\r
3     <xsl:import href="MARC21slimUtils.xsl"/>\r
4     <xsl:output method="xml" encoding="UTF-8" indent="yes"/>\r
5 \r
6 <xsl:template match="/">\r
7     <metadata>\r
8         <xsl:apply-templates/>\r
9     </metadata>\r
10 </xsl:template>\r
11 \r
12     <xsl:template match="marc:record">\r
13         <idinfo>\r
14             <citation>\r
15                 <citeinfo>\r
16 \r
17                 <xsl:if test="marc:datafield[@tag=100]/marc:subfield[@code='a']!=''">\r
18                     <origin><xsl:value-of select="marc:datafield[@tag=100]/marc:subfield[@code='a']" /></origin>\r
19                 </xsl:if>\r
20 \r
21                 <xsl:if test="marc:datafield[@tag=110]/marc:subfield[@code='a']!=''">\r
22                     <origin><xsl:value-of select="marc:datafield[@tag=110]/marc:subfield[@code='a']" /></origin>\r
23                 </xsl:if>\r
24 \r
25                 <xsl:if test="marc:datafield[@tag=111]/marc:subfield[@code='a']!=''">\r
26                     <origin><xsl:value-of select="marc:datafield[@tag=111]/marc:subfield[@code='a']" /></origin>\r
27                 </xsl:if>\r
28 \r
29                 <pubdate><xsl:value-of select="marc:datafield[@tag=260]/marc:subfield[@code='c']" /></pubdate>\r
30                 <pubtime><xsl:value-of select="marc:datafield[@tag=260]/marc:subfield[@code='c']" /></pubtime>\r
31 \r
32                 <title><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']" /></title>\r
33 \r
34                 <edition><xsl:value-of select="marc:datafield[@tag=250]/marc:subfield[@code='a']" /></edition>\r
35 \r
36                 <pubinfo>\r
37                     <pubplace><xsl:value-of select="marc:datafield[@tag=260]/marc:subfield[@code='a']" /></pubplace>\r
38                     <publish><xsl:value-of select="marc:datafield[@tag=260]/marc:subfield[@code='b']" /></publish>\r
39                 </pubinfo>\r
40 \r
41                 <xsl:for-each select="marc:datafield[@tag=500]">\r
42                     <othercit><xsl:value-of select="marc:subfield[@code='a']" /></othercit>\r
43                 </xsl:for-each>\r
44 \r
45                 <xsl:for-each select="marc:datafield[@tag=856]">\r
46                     <onlink><xsl:value-of select="marc:subfield[@code='u']" /></onlink>\r
47                 </xsl:for-each>\r
48 \r
49                 </citeinfo>\r
50             </citation>\r
51             <descript>\r
52                 <xsl:for-each select="marc:datafield[@tag=520]">\r
53                     <abstract><xsl:value-of select="marc:subfield[@code='a']" /></abstract>\r
54                 </xsl:for-each>\r
55             </descript>\r
56             <timeperd>\r
57             </timeperd>\r
58             <status>\r
59                 <update><xsl:value-of select="marc:datafield[@tag=310]/marc:subfield[@code='c']" /></update>\r
60 \r
61                 <xsl:for-each select="marc:datafield[@tag=583]">\r
62                     <progress><xsl:value-of select="marc:subfield[@code='a']" /></progress>\r
63                 </xsl:for-each>\r
64 \r
65             </status>\r
66             <spdom>\r
67                 <bounding>\r
68                     <westbc><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='d']" /></westbc>\r
69                     <eastbc><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='e']" /></eastbc>\r
70                     <northbc><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='f']" /></northbc>\r
71                     <southbc><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='g']" /></southbc>\r
72                 </bounding>\r
73                 <dsgpoly>\r
74                     <dsgpolyo>\r
75                         <grngpoin>\r
76                             <gringlat><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='s']" /></gringlat>\r
77                             <gringlon><xsl:value-of select="marc:datafield[@tag=034]/marc:subfield[@code='t']" /></gringlon>\r
78                         </grngpoin>\r
79                     </dsgpolyo>\r
80                 </dsgpoly>\r
81             </spdom>\r
82             <keywords>\r
83                 <xsl:for-each select="marc:datafield[@tag=650]">\r
84                     <theme>\r
85                         <themekt><xsl:value-of select="marc:subfield[@code='2']" /></themekt>\r
86                         <themekey><xsl:value-of select="marc:subfield[@code='a']" /></themekey>\r
87                     </theme>\r
88                 </xsl:for-each>\r
89 \r
90                 <xsl:for-each select="marc:datafield[@tag=651]">\r
91                     <place>\r
92                         <placekt><xsl:value-of select="marc:subfield[@code='2']" /></placekt>\r
93                         <placekey><xsl:value-of select="marc:subfield[@code='a']" /></placekey>\r
94                     </place>\r
95                 </xsl:for-each>\r
96 \r
97 \r
98             </keywords>\r
99 \r
100             <xsl:for-each select="marc:datafield[@tag=506]">\r
101                 <acconst><xsl:value-of select="marc:subfield[@code='a']" /></acconst>\r
102             </xsl:for-each>\r
103 \r
104             <xsl:for-each select="marc:datafield[@tag=540]">\r
105                 <useconst><xsl:value-of select="marc:subfield[@code='a']" /></useconst>\r
106             </xsl:for-each>\r
107 \r
108 \r
109             <xsl:for-each select="marc:datafield[@tag=856]">\r
110                 <browse>\r
111                     <browsen><xsl:value-of select="marc:subfield[@code='f']" /></browsen>\r
112                     <browsed><xsl:value-of select="marc:subfield[@code='z']" /></browsed>\r
113                 </browse>\r
114             </xsl:for-each>\r
115 \r
116             <xsl:for-each select="marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]">\r
117                 <datacred><xsl:value-of select="marc:subfield[@code='a']" /></datacred>\r
118             </xsl:for-each>\r
119 \r
120             <xsl:for-each select="marc:datafield[@tag=355]">\r
121                 <secinfo>\r
122                     <secsys><xsl:value-of select="marc:subfield[@code='e']" /></secsys>\r
123                     <secclass><xsl:value-of select="marc:subfield[@code='a']" /></secclass>\r
124                     <sechandl><xsl:value-of select="marc:subfield[@code='b']" /></sechandl>\r
125                 </secinfo>\r
126             </xsl:for-each>\r
127 \r
128             <xsl:for-each select="marc:datafield[@tag=538]">\r
129                 <native><xsl:value-of select="marc:subfield[@code='a']" /></native>\r
130             </xsl:for-each>\r
131 \r
132             <crossref>\r
133             </crossref>\r
134 \r
135         </idinfo>\r
136 \r
137         <dataqual>\r
138             <attracc>\r
139                 <attraccr><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='a']" /></attraccr>\r
140                 <qattracc>\r
141                     <attraccv><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='b']" /></attraccv>\r
142                     <attracce><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='c']" /></attracce>\r
143                 </qattracc>\r
144             </attracc>\r
145 \r
146 \r
147 \r
148             <logic><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='d']" /></logic>\r
149             <complete><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='e']" /></complete>\r
150 \r
151             <posacc>\r
152                 <horizpa><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='f']" /></horizpa>\r
153                 <qhorizpa>\r
154                     <horizpav><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='g']" /></horizpav>\r
155                     <horizpae><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='h']" /></horizpae>\r
156                 </qhorizpa>\r
157 \r
158                 <vertacc>\r
159                     <vertaccr><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='i']" /></vertaccr>\r
160                     <qvertpa>\r
161                         <vertaccv><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='j']" /></vertaccv>\r
162                         <vertacce><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='k']" /></vertacce>\r
163                     </qvertpa>\r
164                 </vertacc>\r
165             </posacc>\r
166 \r
167             <lineage>\r
168 \r
169                 <srcinfo>\r
170                     <srcscale><xsl:value-of select="marc:datafield[@tag=786]/marc:subfield[@code='m']" /></srcscale>\r
171                     <typesrc><xsl:value-of select="marc:datafield[@tag=786]/marc:subfield[@code='h']" /></typesrc>\r
172                     <srctime>\r
173                         <srccurr><xsl:value-of select="marc:datafield[@tag=786]/marc:subfield[@code='j']" /></srccurr>\r
174                     </srctime>\r
175                     <srccitea><xsl:value-of select="marc:datafield[@tag=786]/marc:subfield[@code='p']" /></srccitea>\r
176                     <srccontr><xsl:value-of select="marc:datafield[@tag=786]/marc:subfield[@code='v']" /></srccontr>\r
177                 </srcinfo>\r
178 \r
179                 <procstep>\r
180                     <procdesc><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='a']" /></procdesc>\r
181                     <procdate><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='c']" /></procdate>\r
182                     <proctime><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='c']" /></proctime>\r
183                     <srcprod><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='b']" /></srcprod>\r
184 \r
185                 </procstep>\r
186             </lineage>\r
187 \r
188             <cloud><xsl:value-of select="marc:datafield[@tag=514]/marc:subfield[@code='m']" /></cloud>\r
189 \r
190 \r
191         </dataqual>\r
192 \r
193         <spdoinfo>\r
194             <indspref><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='i']" /></indspref>\r
195             <direct><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='a']" /></direct>\r
196             <xsl:variable name="object" select="marc:datafield[@tag=352]/marc:subfield[@code='a']" />\r
197 \r
198             <xsl:if test="contains(translate($object,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'raster')=false">\r
199 \r
200                 <ptvctinf>\r
201                     <sdtsterm>\r
202                         <sdtstype><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='b']" /></sdtstype>\r
203                         <ptvctcnt><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='c']" /></ptvctcnt>\r
204                     </sdtsterm>\r
205 \r
206                     <vpfterm>\r
207                         <vpflevel><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='g']" /></vpflevel>\r
208                         <vpfinfo><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='b']" /></vpfinfo>\r
209                     </vpfterm>\r
210                 </ptvctinf>\r
211             </xsl:if>\r
212 \r
213             <xsl:if test="contains(translate($object,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'raster')">\r
214                 <rastinfo>\r
215                     <rasttype><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='b']" /></rasttype>\r
216                     <rowcount><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='d']" /></rowcount>\r
217                     <colcount><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='e']" /></colcount>\r
218                     <vrtcount><xsl:value-of select="marc:datafield[@tag=352]/marc:subfield[@code='f']" /></vrtcount>\r
219                 </rastinfo>\r
220             </xsl:if>\r
221         </spdoinfo>\r
222 \r
223         <spref>\r
224             <xsl:for-each select="marc:datafield[@tag=342]">\r
225                 <!--This is the branch for the horizontal grid system-->\r
226                 <xsl:if test="@ind1=0">\r
227                     <horizsys>\r
228                         <geograph>\r
229                             <latres><xsl:value-of select="marc:subfield[@code='c']" /></latres>\r
230                             <longres><xsl:value-of select="marc:subfield[@code='d']" /></longres>\r
231                             <geogunit><xsl:value-of select="marc:subfield[@code='b']" /></geogunit>\r
232                         </geograph>\r
233 \r
234                         <xsl:if test="@ind2=3">\r
235                             <!--Planar system-->\r
236                             <planar>\r
237                                 <mapproj>\r
238 \r
239                                    <mapprojn><xsl:value-of select="marc:subfield[@code='a']" /></mapprojn>\r
240                                    <xsl:variable name="mapproj" select="marc:subfield[@code='a']" />\r
241 \r
242                                     <xsl:if test="contains(translate($mapproj,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'albers')">\r
243                                         <albers>\r
244                                             <mapprojp>\r
245                                                 <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
246                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
247                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
248                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
249                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
250                                             </mapprojp>\r
251                                         </albers>\r
252                                     </xsl:if>\r
253 \r
254                                     <xsl:if test="contains(translate($mapproj,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'azimuthal equidistant')">\r
255                                         <azimequi>\r
256                                             <mapprojp>\r
257                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
258                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
259                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
260                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
261                                             </mapprojp>\r
262                                         </azimequi>\r
263                                     </xsl:if>\r
264 \r
265                                     <xsl:if test="contains(translate($mapproj,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'equidistant conic')">\r
266                                         <equicon>\r
267                                             <mapprojp>\r
268                                                 <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
269                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
270                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
271                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
272                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
273                                             </mapprojp>\r
274                                         </equicon>\r
275                                     </xsl:if>\r
276 \r
277                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'equirectangular')">\r
278                                         <equirect>\r
279                                             <mapprojp>\r
280                                                 <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
281                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
282                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
283                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
284                                             </mapprojp>\r
285                                         </equirect>\r
286                                     </xsl:if>\r
287 \r
288 \r
289                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'general vertical near')">\r
290                                         <gvnsp>\r
291                                             <mapprojp>\r
292                                                 <heightpt><xsl:value-of select="marc:subfield[@code='l']" /></heightpt>\r
293                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
294                                                 <latprjc><xsl:value-of select="marc:subfield[@code='h']" /></latprjc>\r
295                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
296                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
297                                             </mapprojp>\r
298                                         </gvnsp>\r
299                                     </xsl:if>\r
300 \r
301 \r
302                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'gnomonic')">\r
303                                         <gnomonic>\r
304                                             <mapprojp>\r
305                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
306                                                 <latprjc><xsl:value-of select="marc:subfield[@code='h']" /></latprjc>\r
307                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
308                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
309                                             </mapprojp>\r
310                                         </gnomonic>\r
311                                     </xsl:if>\r
312 \r
313 \r
314                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'lambert azimuthal')">\r
315                                         <lamberta>\r
316                                             <mapprojp>\r
317                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
318                                                 <latprjc><xsl:value-of select="marc:subfield[@code='h']" /></latprjc>\r
319                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
320                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
321                                             </mapprojp>\r
322                                         </lamberta>\r
323                                     </xsl:if>\r
324 \r
325 \r
326                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'lambert conformal')">\r
327                                         <lambertc>\r
328                                             <mapprojp>\r
329                                                 <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
330                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
331                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
332                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
333                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
334                                             </mapprojp>\r
335                                         </lambertc>\r
336                                     </xsl:if>\r
337 \r
338                                    <xsl:if test="translate($mapproj,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='Mercator'">\r
339                                         <mercator>\r
340                                             <mapprojp>\r
341                                                 <xsl:if test="@ind2=1">\r
342                                                     <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
343                                                 </xsl:if>\r
344                                                 <xsl:if test="@ind1=1">\r
345                                                     <sfequat><xsl:value-of select="marc:subfield[@code='k']" /></sfequat>\r
346                                                 </xsl:if>\r
347                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
348                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
349                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
350                                             </mapprojp>\r
351                                         </mercator>\r
352                                     </xsl:if>\r
353 \r
354 \r
355                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'alaska')">\r
356                                         <modsak>\r
357                                             <mapprojp>\r
358                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
359                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
360                                             </mapprojp>\r
361                                         </modsak>\r
362                                     </xsl:if>\r
363 \r
364 \r
365                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'miller cylindrical')">\r
366                                         <miller>\r
367                                             <mapprojp>\r
368                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
369                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
370                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
371                                             </mapprojp>\r
372                                         </miller>\r
373                                     </xsl:if>\r
374 \r
375                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'oblique mercator')">\r
376                                         <obqmerc>\r
377                                             <mapprojp>\r
378                                                 <xsl:if test="@ind1=1">\r
379                                                     <sfctrlin><xsl:value-of select="marc:subfield[@code='k']" /></sfctrlin>\r
380                                                     <obqlazim>\r
381                                                         <azimangl><xsl:value-of select="marc:subfield[@code='m']" /></azimangl>\r
382                                                         <azimptl><xsl:value-of select="marc:subfield[@code='n']" /></azimptl>\r
383                                                     </obqlazim>\r
384                                                 </xsl:if>\r
385 \r
386                                                 <xsl:if test="@ind2=1">\r
387                                                     <!--This should repeat, but I haven't set this up-->\r
388                                                     <obqlpt>\r
389                                                         <obqllat><xsl:value-of select="marc:subfield[@code='e']" /></obqllat>\r
390                                                         <obqllong><xsl:value-of select="marc:subfield[@code='f']" /></obqllong>\r
391                                                     </obqlpt>\r
392                                                     <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
393                                                     <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
394                                                     <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
395                                                 </xsl:if>\r
396 \r
397                                             </mapprojp>\r
398                                         </obqmerc>\r
399                                     </xsl:if>\r
400 \r
401                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'orthographic')">\r
402                                         <orthogr>\r
403                                             <mapprojp>\r
404                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
405                                                 <latprjc><xsl:value-of select="marc:subfield[@code='h']" /></latprjc>\r
406                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
407                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
408                                             </mapprojp>\r
409                                         </orthogr>\r
410                                     </xsl:if>\r
411 \r
412 \r
413                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'polar stereographic')">\r
414                                         <polarst>\r
415                                             <mapprojp>\r
416                                                 <svlong><xsl:value-of select="marc:subfield[@code='n']" /></svlong>\r
417                                                 <xsl:if test="@ind1=1">\r
418                                                     <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
419                                                 </xsl:if>\r
420 \r
421                                                 <xsl:if test="@ind2=1">\r
422                                                     <sfprjorg><xsl:value-of select="marc:subfield[@code='k']" /></sfprjorg>\r
423                                                 </xsl:if>\r
424 \r
425                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
426                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
427                                             </mapprojp>\r
428                                         </polarst>\r
429                                     </xsl:if>\r
430 \r
431                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'polyconic')">\r
432                                         <polycon>\r
433                                             <mapprojp>\r
434                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
435                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
436                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
437                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
438                                             </mapprojp>\r
439                                         </polycon>\r
440                                     </xsl:if>\r
441 \r
442                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'robinson')">\r
443                                         <robinson>\r
444                                             <mapprojp>\r
445                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
446                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
447                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
448                                             </mapprojp>\r
449                                         </robinson>\r
450                                     </xsl:if>\r
451 \r
452                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'sinusoidal')">\r
453                                         <sinusoid>\r
454                                             <mapprojp>\r
455                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
456                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
457                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
458                                             </mapprojp>\r
459                                         </sinusoid>\r
460                                     </xsl:if>\r
461 \r
462                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'space oblique mercator')">\r
463                                         <spaceobq>\r
464                                             <mapprojp>\r
465                                                 <landsat><xsl:value-of select="marc:subfield[@code='o']" /></landsat>\r
466                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
467                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
468                                             </mapprojp>\r
469                                         </spaceobq>\r
470                                     </xsl:if>\r
471 \r
472 \r
473 \r
474                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'stereographic')">\r
475                                         <stereo>\r
476                                             <mapprojp>\r
477                                                 <longpc><xsl:value-of select="marc:subfield[@code='g']" /></longpc>\r
478                                                 <latprjc><xsl:value-of select="marc:subfield[@code='h']" /></latprjc>\r
479                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
480                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
481                                             </mapprojp>\r
482                                         </stereo>\r
483                                     </xsl:if>\r
484 \r
485                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'transverse mercator')">\r
486                                         <transmer>\r
487                                             <mapprojp>\r
488                                                 <sfctrmer><xsl:value-of select="marc:subfield[@code='k']" /></sfctrmer>\r
489                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
490                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
491                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
492                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
493                                             </mapprojp>\r
494                                         </transmer>\r
495                                     </xsl:if>\r
496 \r
497                                     <xsl:if test="contains(translate($mapproj, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'van der grinten')">\r
498                                         <vdgrin>\r
499                                             <mapprojp>\r
500                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
501                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
502                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
503                                             </mapprojp>\r
504                                         </vdgrin>\r
505                                     </xsl:if>\r
506 \r
507 \r
508                                 </mapproj>\r
509                             </planar>\r
510                         </xsl:if>\r
511                         <xsl:if test="@ind2=2">\r
512                             <!--Grid Coordinate system-->\r
513                             <gridsys>\r
514                                 <gridsysn><xsl:value-of select="marc:subfield[@code='a']" /></gridsysn>\r
515                                 <xsl:variable name="gridname" select="marc:subfield[@code='a']" />\r
516                                 <xsl:if test="contains(translate($gridname,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'universal transverse mercator')">\r
517                                     <utm>\r
518                                         <utmzone><xsl:value-of select="marc:subfield[@code='p']" /></utmzone>\r
519                                         <mapprojp>\r
520                                                 <sfctrmer><xsl:value-of select="marc:subfield[@code='k']" /></sfctrmer>\r
521                                                 <longcm><xsl:value-of select="marc:subfield[@code='g']" /></longcm>\r
522                                                 <latprjo><xsl:value-of select="marc:subfield[@code='h']" /></latprjo>\r
523                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
524                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
525                                         </mapprojp>\r
526                                     </utm>\r
527                                 </xsl:if>\r
528 \r
529                                 <xsl:if test="contains(translate($gridname,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'), 'universal polar stereographic')">\r
530                                     <ups>\r
531                                         <upszone><xsl:value-of select="marc:subfield[@code='p']" /></upszone>\r
532                                         <mapprojp>\r
533                                                 <svlong><xsl:value-of select="marc:subfield[@code='n']" /></svlong>\r
534                                                 <xsl:if test="@ind1=1">\r
535                                                     <stdparll><xsl:value-of select="marc:subfield[@code='e']" /></stdparll>\r
536                                                 </xsl:if>\r
537 \r
538                                                 <xsl:if test="@ind2=1">\r
539                                                     <sfprjorg><xsl:value-of select="marc:subfield[@code='k']" /></sfprjorg>\r
540                                                 </xsl:if>\r
541 \r
542                                                 <feast><xsl:value-of select="marc:subfield[@code='i']" /></feast>\r
543                                                 <fnorth><xsl:value-of select="marc:subfield[@code='j']" /></fnorth>\r
544                                         </mapprojp>\r
545                                     </ups>\r
546                                 </xsl:if>\r
547 \r
548                                 <xsl:if test="contains(translate($gridname,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'1927')">\r
549                                     <spcs>\r
550                                         <spcszone>1927</spcszone>\r
551                                     </spcs>\r
552                                 </xsl:if>\r
553 \r
554                                 <xsl:if test="contains(translate($gridname, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'1983')">\r
555                                     <spcs>\r
556                                         <spcszone>1983</spcszone>\r
557                                     </spcs>\r
558                                 </xsl:if>\r
559 \r
560                                 <xsl:if test="contains(translate($gridname,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'arc')">\r
561                                     <arcsys>\r
562                                         <arczone><xsl:value-of select="marc:subfield[@code='p']" /></arczone>\r
563                                     </arcsys>\r
564                                 </xsl:if>\r
565 \r
566                                 <xsl:if test="translate(contains($gridname,'other'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')">\r
567                                     <othergrd>\r
568                                     </othergrd>\r
569                                 </xsl:if>\r
570                             </gridsys>\r
571                         </xsl:if>\r
572 \r
573                         <planci>\r
574                             <plance><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='a']" /></plance>\r
575                             <coordrep>\r
576                                 <absres><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='c']" /></absres>\r
577                                 <ordres><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='d']" /></ordres>\r
578                             </coordrep>\r
579                             <distbrep>\r
580                                 <distres><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='e']" /></distres>\r
581                                 <bearres><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='f']" /></bearres>\r
582                                 <bearunit><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='a']" /></bearunit>\r
583                                 <bearrefd><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='n']" /></bearrefd>\r
584                                 <bearrefm><xsl:value-of select="marc:datafield[@tag=343]/marc:subfield[@code='i']" /></bearrefm>\r
585                             </distbrep>\r
586                         </planci>\r
587 \r
588 \r
589                     </horizsys>\r
590                 </xsl:if>\r
591                 <xsl:if test="@ind1=1">\r
592                     <vertdef>\r
593                         <altsys>\r
594                             <altdatum><xsl:value-of select="marc:subfield[@code='a']" /></altdatum>\r
595                             <altres><xsl:value-of select="marc:field[@code='t']" /></altres>\r
596                             <altunits><xsl:value-of select="marc:subfield[@code='b']" /></altunits>\r
597                             <altenc><xsl:value-of select="marc:subfield[@code='u']" /></altenc>\r
598                         </altsys>\r
599 \r
600 \r
601                     </vertdef>\r
602 \r
603                 </xsl:if>\r
604 \r
605 \r
606             </xsl:for-each>\r
607 \r
608         </spref>\r
609 \r
610 \r
611         <eainfo>\r
612             <xsl:for-each select="marc:datafield[@tag=552]">\r
613                 <detailed>\r
614 \r
615                     <enttype>\r
616                         <enttypl><xsl:value-of select="marc:subfield[@code='a']" /></enttypl>\r
617                         <enttypd><xsl:value-of select="marc:subfield[@code='b']" /></enttypd>\r
618                     </enttype>\r
619 \r
620                     <attr>\r
621                         <attrlabl><xsl:value-of select="marc:subfield[@code='c']" /></attrlabl>\r
622                         <attrdef><xsl:value-of select="marc:subfield[@code='d']" /></attrdef>\r
623                         <attrdomv>\r
624                             <edom>\r
625                                 <edomv><xsl:value-of select="marc:subfield[@code='e']" /></edomv>\r
626                                 <edomvd><xsl:value-of select="marc:subfield[@code='f']" /></edomvd>\r
627                             </edom>\r
628 \r
629                             <rdom>\r
630                                 <rdommin><xsl:value-of select="substring-before(marc:subfield[@code='g'],'-')" /></rdommin>\r
631                                 <rdommax><xsl:value-of select="substring-after(marc:subfield[@code='g'],'-')" /></rdommax>\r
632                             </rdom>\r
633                             <codesetd>\r
634                                 <codesets><xsl:value-of select="marc:subfield[@code='h']" /></codesets>\r
635                             </codesetd>\r
636                             <udom><xsl:value-of select="marc:subfield[@code='i']" /></udom>\r
637                         </attrdomv>\r
638 \r
639                         <attrunit><xsl:value-of select="marc:subfield[@code='j']" /></attrunit>\r
640                         <begdatea><xsl:value-of select="substring-before(marc:subfield[@code='k'],'-')" /></begdatea>\r
641                         <enddatea><xsl:value-of select="substring-after(marc:subfield[@code='k'],'-')" /></enddatea>\r
642                         <attrvai>\r
643                             <attrva><xsl:value-of select="marc:subfield[@code='l']" /></attrva>\r
644                             <attrvae><xsl:value-of select="marc:subfield[@code='m']" /></attrvae>\r
645                         </attrvai>\r
646 \r
647                         <attrmfrq><xsl:value-of select="marc:subfield[@code='n']" /></attrmfrq>\r
648                     </attr>\r
649 \r
650                     <overview>\r
651                         <eaover><xsl:value-of select="marc:subfield[@code='o']" /></eaover>\r
652                         <eadetcit><xsl:value-of select="marc:subfield[@code='p']" /></eadetcit>\r
653                     </overview>\r
654 \r
655                 </detailed>\r
656             </xsl:for-each>\r
657 \r
658         </eainfo>\r
659 \r
660 \r
661         <distinfo>\r
662             <xsl:for-each select="marc:datafield[@tag=037]">\r
663                 <stdorder>\r
664                     <nondig><xsl:value-of select="marc:subfield[@code='f']" /></nondig>\r
665                     <digform>\r
666                         <digtinfo>\r
667                             <formname><xsl:value-of select="marc:subfield[@code='g']" /></formname>\r
668                             <formspec><xsl:value-of select="marc:subfield[@code='h']" /></formspec>\r
669                             <formcont><xsl:value-of select="marc:subfield[@code='n']" /></formcont>\r
670                         </digtinfo>\r
671                         <digtopt>\r
672                             <onlinopt>\r
673                                  <computer>\r
674                                     <dialinst>\r
675                                         <lowbps><xsl:value-of select="substring-before(marc:datafield[@tag='856']/marc:subfield[@code='j'],'-')" /></lowbps>\r
676                                         <highbps><xsl:value-of select="substring-after(marc:datafield[@tag='856']/marc:subfield[@code='j'],'-')" /></highbps>\r
677                                         <numdata><xsl:value-of select="marc:datafield[@tag='856']/marc:subfield[@code='r']" /></numdata>\r
678                                         <compress><xsl:value-of select="marc:datafield[@tag='856']/marc:subfield[@code='c']" /></compress>\r
679                                         <dialtel><xsl:value-of select="marc:datafield[@tag='856']/marc:subfield[@code='b']" /></dialtel>\r
680                                         <dialfile><xsl:value-of select="marc:datafield[@tag='856']/marc:subfield[@code='f']" /></dialfile>\r
681                                     </dialinst>\r
682                                     <accinstr><xsl:value-of select="marc:datafield[@tag='856']/marc:subfield[@code='i']" /></accinstr>\r
683                                 </computer>\r
684                             </onlinopt>\r
685                         </digtopt>\r
686                     </digform>\r
687                     <custom><xsl:value-of select="marc:subfield[@code='c']" /></custom>\r
688                 </stdorder>\r
689                 <availabl>\r
690                     <timeinfo>\r
691                         <sngdate>\r
692                             <caldate><xsl:value-of select="marc:datafield[@tag=045]/marc:subfield[@code='b']" /></caldate>\r
693                         </sngdate>\r
694 \r
695                     </timeinfo>\r
696                 </availabl>\r
697             </xsl:for-each>\r
698         </distinfo>\r
699 \r
700         <metainfo>\r
701             <metd><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='c']" /></metd>\r
702             <metrd><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='z']" /></metrd>\r
703             <metc>\r
704                 <cntinfo>\r
705                     <cntperp>\r
706                         <cntper><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='p']" /></cntper>\r
707                         <cntorg><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='q']" /></cntorg>\r
708                     </cntperp>\r
709                     <cntaddr>\r
710                         <addrtype><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='i']" /></addrtype>\r
711                         <address><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='a']" /></address>\r
712                         <city><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='b']" /></city>\r
713                         <state><xsl:value-of select="substring-before(marc:datafield[@tag=270]/marc:subfield[@code='c'],',')" /></state>\r
714                         <postal><xsl:value-of select="substring-after(marc:datafield[@tag=270]/marc:subfield[@code='c'],',')" /></postal>\r
715                         <country><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='d']" /></country>\r
716                     </cntaddr>\r
717                     <cntvoice><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='k']" /></cntvoice>\r
718                     <cnttdd><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='h']" /></cnttdd>\r
719                     <cntemail><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='m']" /></cntemail>\r
720                     <hours><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='r']" /></hours>\r
721                     <cntinst><xsl:value-of select="marc:datafield[@tag=270]/marc:subfield[@code='z']" /></cntinst>\r
722                 </cntinfo>\r
723             </metc>\r
724             <metstdn><xsl:value-of select="marc:datafield[@tag=583]/marc:subfield[@code='f']" /></metstdn>\r
725             <metac><xsl:value-of select="marc:datafield[@tag=506]/marc:subfield[@code='a']" /></metac>\r
726         </metainfo>\r
727 \r
728 \r
729 \r
730     </xsl:template>\r
731 </xsl:stylesheet>\r
732 <!--http://creativecommons.org/licenses/zero/1.0/\r
733 Creative Commons 1.0 Universal\r
734 The person who associated a work with this document has dedicated this work to the \r
735 Commons by waiving all of his or her rights to the work under copyright law and all \r
736 related or neighboring legal rights he or she had in the work, to the extent allowable by law. \r
737 -->\r