<?xml version="1.0" encoding="UTF-8"?>
<!-- last update: 2010-01-12, Anna.Milan@noaa.gov -->

<!-- This translates seismicMetadata (version date: 2010-01-11) to ISO 19115/19115-2 formatted as ISO 19139 compliant XML-->

<!-- seismicMetadata sections not translated:  
			seismicNavFile
			acquisitionParameters
			objectInformation
			seismicDataObject	
-->
<!-- To Do: fix dates: test for YYYY, MM-YYYY? -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<gmi:MI_Metadata xmlns="http://www.isotc211.org/2005/gmi" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gsr="http://www.isotc211.org/2005/gsr"
			xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
			<xsl:attribute name="xsi:schemaLocation" namespace="http://www.w3.org/2001/XMLSchema-instance">
				<xsl:value-of select="'http://www.isotc211.org/2005/gmi http://ngdc.noaa.gov/metadata/published/xsd/schema.xsd'"/>
			</xsl:attribute>
			<xsl:for-each select="seismicMetadata">
				<gmd:fileIdentifier>
					<gco:CharacterString>
						<xsl:value-of select="datasetInformation/datasetID"/>
					</gco:CharacterString>
				</gmd:fileIdentifier>
				<xsl:for-each select="metadataInformation/metadataContact">
					<gmd:contact>
						<gmd:CI_ResponsibleParty>
							<xsl:if test="contactInformation/@ID">
								<xsl:attribute name="uuid">
									<xsl:value-of select="contactInformation/@ID"/>
								</xsl:attribute>
							</xsl:if>
							<gmd:individualName>
								<gco:CharacterString>
									<xsl:value-of select="contactInformation/name"/>
								</gco:CharacterString>
							</gmd:individualName>
							<xsl:for-each select="contactInformation/organization">
								<gmd:organisationName>
									<gco:CharacterString>
										<xsl:value-of select="."/>
									</gco:CharacterString>
								</gmd:organisationName>
							</xsl:for-each>
							<gmd:contactInfo>
								<gmd:CI_Contact>
									<gmd:address>
										<gmd:CI_Address>
											<gmd:electronicMailAddress>
												<gco:CharacterString>
													<xsl:value-of select="contactInformation/email"/>
												</gco:CharacterString>
											</gmd:electronicMailAddress>
										</gmd:CI_Address>
									</gmd:address>
								</gmd:CI_Contact>
							</gmd:contactInfo>
							<gmd:role>
								<gmd:CI_RoleCode>
									<xsl:attribute name="codeList">
										<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
									</xsl:attribute>
									<xsl:attribute name="codeListValue">
										<xsl:value-of select="contactInformation/role"/>
									</xsl:attribute>
								</gmd:CI_RoleCode>
							</gmd:role>
						</gmd:CI_ResponsibleParty>
					</gmd:contact>
				</xsl:for-each>
				<gmd:dateStamp>
					<gco:Date>
						<xsl:value-of select="metadataInformation/metadataDate"/>
					</gco:Date>
				</gmd:dateStamp>
				<gmd:identificationInfo>
					<gmd:MD_DataIdentification>
						<gmd:citation>
							<gmd:CI_Citation>
								<gmd:title>
									<gco:CharacterString>
										<xsl:value-of select="datasetInformation/datasetTitle"/>
									</gco:CharacterString>
								</gmd:title>
								<xsl:for-each select="datasetInformation/datasetStartDate">
									<gmd:date>
										<gmd:CI_Date>
											<gmd:date>
												<gco:Date>
													<xsl:value-of select="date"/>
												</gco:Date>
											</gmd:date>
											<gmd:dateType>
												<gmd:CI_DateTypeCode>
													<xsl:attribute name="codeList">
														<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
													</xsl:attribute>
													<xsl:attribute name="codeListValue">
														<xsl:value-of select="dateTypeCode"/>
													</xsl:attribute>
													<xsl:value-of select="dateTypeCode"/>
												</gmd:CI_DateTypeCode>
											</gmd:dateType>
										</gmd:CI_Date>
									</gmd:date>
								</xsl:for-each>
								<gmd:identifier>
									<gmd:MD_Identifier>
										<gmd:code>
											<gco:CharacterString>
												<xsl:value-of select="datasetInformation/datasetID"/>
											</gco:CharacterString>
										</gmd:code>
									</gmd:MD_Identifier>
								</gmd:identifier>
							</gmd:CI_Citation>
						</gmd:citation>
						<gmd:abstract>
							<gco:CharacterString>
								<xsl:value-of select="datasetInformation/datasetDescription"/>
							</gco:CharacterString>
						</gmd:abstract>
						<gmd:purpose>
							<gco:CharacterString>
								<xsl:value-of select="datasetInformation/purpose"/>
							</gco:CharacterString>
						</gmd:purpose>
						<xsl:if test="//projectSponsor">
							<xsl:for-each select="datasetInformation/projectSponsor">
								<gmd:credit>
									<gco:CharacterString>
										<xsl:value-of select="name(node())"/>:<xsl:value-of select="node()"/>, </gco:CharacterString>
								</gmd:credit>
							</xsl:for-each>
						</xsl:if>
						<xsl:for-each select="datasetInformation/resourceProvider">
							<xsl:for-each select="contactInformation">
								<gmd:pointOfContact>
									<gmd:CI_ResponsibleParty>
										<xsl:if test="./@ID">
											<xsl:attribute name="uuid">
												<xsl:value-of select="./@ID"/>
											</xsl:attribute>
										</xsl:if>
										<gmd:individualName>
											<gco:CharacterString>
												<xsl:value-of select="./name"/>
											</gco:CharacterString>
										</gmd:individualName>
										<xsl:for-each select="./organization">
											<gmd:organisationName>
												<gco:CharacterString>
													<xsl:value-of select="."/>
												</gco:CharacterString>
											</gmd:organisationName>
										</xsl:for-each>
										<gmd:contactInfo>
											<gmd:CI_Contact>
												<gmd:address>
													<gmd:CI_Address>
														<gmd:electronicMailAddress>
															<gco:CharacterString>
																<xsl:value-of select="./email"/>
															</gco:CharacterString>
														</gmd:electronicMailAddress>
													</gmd:CI_Address>
												</gmd:address>
											</gmd:CI_Contact>
										</gmd:contactInfo>
										<gmd:role>
											<gmd:CI_RoleCode>
												<xsl:attribute name="codeList">
													<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
												</xsl:attribute>
												<xsl:attribute name="codeListValue">
													<xsl:value-of select="./role"/>
												</xsl:attribute>
											</gmd:CI_RoleCode>
										</gmd:role>
									</gmd:CI_ResponsibleParty>
								</gmd:pointOfContact>
							</xsl:for-each>
						</xsl:for-each>
						<xsl:for-each select="datasetInformation/dataContact">
							<xsl:for-each select="contactInformation">
								<gmd:pointOfContact>
									<gmd:CI_ResponsibleParty>
										<xsl:if test="./@ID">
											<xsl:attribute name="uuid">
												<xsl:value-of select="./@ID"/>
											</xsl:attribute>
										</xsl:if>
										<gmd:individualName>
											<gco:CharacterString>
												<xsl:value-of select="./name"/>
											</gco:CharacterString>
										</gmd:individualName>
										<xsl:for-each select="./organization">
											<gmd:organisationName>
												<gco:CharacterString>
													<xsl:value-of select="."/>
												</gco:CharacterString>
											</gmd:organisationName>
										</xsl:for-each>
										<gmd:contactInfo>
											<gmd:CI_Contact>
												<gmd:address>
													<gmd:CI_Address>
														<gmd:electronicMailAddress>
															<gco:CharacterString>
																<xsl:value-of select="./email"/>
															</gco:CharacterString>
														</gmd:electronicMailAddress>
													</gmd:CI_Address>
												</gmd:address>
											</gmd:CI_Contact>
										</gmd:contactInfo>
										<gmd:role>
											<gmd:CI_RoleCode>
												<xsl:attribute name="codeList">
													<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
												</xsl:attribute>
												<xsl:attribute name="codeListValue">
													<xsl:value-of select="./role"/>
												</xsl:attribute>
											</gmd:CI_RoleCode>
										</gmd:role>
									</gmd:CI_ResponsibleParty>
								</gmd:pointOfContact>
							</xsl:for-each>
						</xsl:for-each>
						<gmd:resourceFormat>
							<gmd:MD_Format>
								<gmd:name>
									<xsl:for-each select="datasetInformation/dataMedia">
										<gco:CharacterString>
											<xsl:value-of select="."/>
										</gco:CharacterString>
									</xsl:for-each>
								</gmd:name>
								<gmd:version gco:nilReason="inapplicable"/>
							</gmd:MD_Format>
						</gmd:resourceFormat>
						<gmd:descriptiveKeywords>
							<gmd:MD_Keywords>
								<gmd:keyword>
									<gco:CharacterString>
										<xsl:value-of select="datasetInformation/dataClass"/>
									</gco:CharacterString>
								</gmd:keyword>
								<gmd:type>
									<gmd:MD_KeywordTypeCode>
										<xsl:attribute name="codeList">
											<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
										</xsl:attribute>
										<xsl:attribute name="codeListValue">
											<xsl:value-of select="'theme'"/>
										</xsl:attribute>
									</gmd:MD_KeywordTypeCode>
								</gmd:type>
								<gmd:thesaurusName>
									<gmd:CI_Citation>
										<gmd:title>
											<gco:CharacterString>
												<xsl:value-of select="'Data Class Keywords'"/>
											</gco:CharacterString>
										</gmd:title>
										<gmd:date>
											<gmd:CI_Date>
												<gmd:date>
													<gco:Date>
														<xsl:value-of select="'2009-12-01'"/>
													</gco:Date>
												</gmd:date>
												<gmd:dateType>
													<gmd:CI_DateTypeCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publication'"/>
														</xsl:attribute>
													</gmd:CI_DateTypeCode>
												</gmd:dateType>
											</gmd:CI_Date>
										</gmd:date>
										<gmd:citedResponsibleParty>
											<gmd:CI_ResponsibleParty>
												<gmd:organisationName>
													<gco:CharacterString>
														<xsl:value-of select="'DOC/NOAA/NESDIS/NGDC &gt; National Geophysical Data Center, NESDIS, NOAA, Department of Commerce'"/>
													</gco:CharacterString>
												</gmd:organisationName>
												<gmd:contactInfo>
													<gmd:CI_Contact>
														<gmd:onlineResource>
															<gmd:CI_OnlineResource>
																<gmd:linkage>
																	<gmd:URL>
																		<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																	</gmd:URL>
																</gmd:linkage>
																<gmd:name>
																	<gco:CharacterString>
																		<xsl:value-of select="'Seismic Metadata Controlled Vocabulary'"/>
																	</gco:CharacterString>
																</gmd:name>
																<gmd:function>
																	<gmd:CI_OnLineFunctionCode>
																		<xsl:attribute name="codeList">
																			<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																		</xsl:attribute>
																		<xsl:attribute name="codeListValue">
																			<xsl:value-of select="'information'"/>
																		</xsl:attribute>
																		<xsl:value-of select="'information'"/>
																	</gmd:CI_OnLineFunctionCode>
																</gmd:function>
															</gmd:CI_OnlineResource>
														</gmd:onlineResource>
													</gmd:CI_Contact>
												</gmd:contactInfo>
												<gmd:role>
													<gmd:CI_RoleCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publisher'"/>
														</xsl:attribute>
													</gmd:CI_RoleCode>
												</gmd:role>
											</gmd:CI_ResponsibleParty>
										</gmd:citedResponsibleParty>
									</gmd:CI_Citation>
								</gmd:thesaurusName>
							</gmd:MD_Keywords>
						</gmd:descriptiveKeywords>
						<gmd:descriptiveKeywords>
							<gmd:MD_Keywords>
								<gmd:keyword>
									<gco:CharacterString>
										<xsl:value-of select="datasetInformation/dataType"/>
									</gco:CharacterString>
								</gmd:keyword>
								<gmd:thesaurusName>
									<gmd:CI_Citation>
										<gmd:title>
											<gco:CharacterString>
												<xsl:value-of select="'DataType Keywords'"/>
											</gco:CharacterString>
										</gmd:title>
										<gmd:date>
											<gmd:CI_Date>
												<gmd:date>
													<gco:Date>
														<xsl:value-of select="'2009-12-01'"/>
													</gco:Date>
												</gmd:date>
												<gmd:dateType>
													<gmd:CI_DateTypeCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publication'"/>
														</xsl:attribute>
													</gmd:CI_DateTypeCode>
												</gmd:dateType>
											</gmd:CI_Date>
										</gmd:date>
									</gmd:CI_Citation>
								</gmd:thesaurusName>
							</gmd:MD_Keywords>
						</gmd:descriptiveKeywords>
						<gmd:descriptiveKeywords>
							<gmd:MD_Keywords>
								<gmd:keyword>
									<xsl:for-each select="datasetInformation/processedMethod">
										<gco:CharacterString>
											<xsl:value-of select="."/>
										</gco:CharacterString>
									</xsl:for-each>
								</gmd:keyword>
								<gmd:type>
									<gmd:MD_KeywordTypeCode>
										<xsl:attribute name="codeList">
											<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
										</xsl:attribute>
										<xsl:attribute name="codeListValue">
											<xsl:value-of select="'theme'"/>
										</xsl:attribute>
									</gmd:MD_KeywordTypeCode>
								</gmd:type>
								<gmd:thesaurusName>
									<gmd:CI_Citation>
										<gmd:title>
											<gco:CharacterString>
												<xsl:value-of select="'ProcessedMethod Keywords'"/>
											</gco:CharacterString>
										</gmd:title>
										<gmd:date>
											<gmd:CI_Date>
												<gmd:date>
													<gco:Date>
														<xsl:value-of select="'2009-12-01'"/>
													</gco:Date>
												</gmd:date>
												<gmd:dateType>
													<gmd:CI_DateTypeCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publication'"/>
														</xsl:attribute>
													</gmd:CI_DateTypeCode>
												</gmd:dateType>
											</gmd:CI_Date>
										</gmd:date>
									</gmd:CI_Citation>
								</gmd:thesaurusName>
							</gmd:MD_Keywords>
						</gmd:descriptiveKeywords>
						<gmd:descriptiveKeywords>
							<gmd:MD_Keywords>
								<gmd:keyword>
									<xsl:for-each select="datasetInformation/processedDataClass">
										<gco:CharacterString>
											<xsl:value-of select="."/>
										</gco:CharacterString>
									</xsl:for-each>
								</gmd:keyword>
								<gmd:type>
									<gmd:MD_KeywordTypeCode>
										<xsl:attribute name="codeList">
											<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
										</xsl:attribute>
										<xsl:attribute name="codeListValue">
											<xsl:value-of select="'theme'"/>
										</xsl:attribute>
									</gmd:MD_KeywordTypeCode>
								</gmd:type>
								<gmd:thesaurusName>
									<gmd:CI_Citation>
										<gmd:title>
											<gco:CharacterString>
												<xsl:value-of select="'ProcessedDataClass Keywords'"/>
											</gco:CharacterString>
										</gmd:title>
										<gmd:date>
											<gmd:CI_Date>
												<gmd:date>
													<gco:Date>
														<xsl:value-of select="'2009-12-01'"/>
													</gco:Date>
												</gmd:date>
												<gmd:dateType>
													<gmd:CI_DateTypeCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publication'"/>
														</xsl:attribute>
													</gmd:CI_DateTypeCode>
												</gmd:dateType>
											</gmd:CI_Date>
										</gmd:date>
									</gmd:CI_Citation>
								</gmd:thesaurusName>
							</gmd:MD_Keywords>
						</gmd:descriptiveKeywords>
						<gmd:descriptiveKeywords>
							<gmd:MD_Keywords>
								<gmd:keyword>
									<xsl:for-each select="datasetInformation/seismicDataProvenance">
										<gco:CharacterString>
											<xsl:value-of select="."/>
										</gco:CharacterString>
									</xsl:for-each>
								</gmd:keyword>
								<gmd:thesaurusName>
									<gmd:CI_Citation>
										<gmd:title>
											<gco:CharacterString>
												<xsl:value-of select="'SeismicDataProvenance Keywords'"/>
											</gco:CharacterString>
										</gmd:title>
										<gmd:date>
											<gmd:CI_Date>
												<gmd:date>
													<gco:Date>
														<xsl:value-of select="'2009-12-01'"/>
													</gco:Date>
												</gmd:date>
												<gmd:dateType>
													<gmd:CI_DateTypeCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'publication'"/>
														</xsl:attribute>
													</gmd:CI_DateTypeCode>
												</gmd:dateType>
											</gmd:CI_Date>
										</gmd:date>
									</gmd:CI_Citation>
								</gmd:thesaurusName>
							</gmd:MD_Keywords>
						</gmd:descriptiveKeywords>
						<xsl:for-each select="datasetInformation/geographicFeatures">
							<gmd:descriptiveKeywords>
								<gmd:MD_Keywords>
									<xsl:for-each select="featureName">
										<gmd:keyword>
											<gco:CharacterString>
												<xsl:value-of select="."/>
											</gco:CharacterString>
										</gmd:keyword>
									</xsl:for-each>
									<gmd:type>
										<gmd:MD_KeywordTypeCode>
											<xsl:attribute name="codeList">
												<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
											</xsl:attribute>
											<xsl:attribute name="codeListValue">
												<xsl:value-of select="'place'"/>
											</xsl:attribute>
										</gmd:MD_KeywordTypeCode>
									</gmd:type>
									<xsl:for-each select="featureAuthority">
										<gmd:thesaurusName>
											<gmd:CI_Citation>
												<xsl:if test="citationInformation/@ID">
													<xsl:attribute name="uuid">
														<xsl:value-of select="citationInformation/@ID"/>
													</xsl:attribute>
												</xsl:if>
												<gmd:title>
													<gco:CharacterString>
														<xsl:value-of select="citationInformation/title"/>
													</gco:CharacterString>
												</gmd:title>
												<xsl:for-each select="citationInformation/citationDate">
													<gmd:date>
														<gmd:CI_Date>
															<gmd:date>
																<gco:Date>
																	<xsl:value-of select="date"/>
																</gco:Date>
															</gmd:date>
															<gmd:dateType>
																<gmd:CI_DateTypeCode>
																	<xsl:attribute name="codeList">
																		<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																	</xsl:attribute>
																	<xsl:attribute name="codeListValue">
																		<xsl:value-of select="dateTypeCode"/>
																	</xsl:attribute>
																</gmd:CI_DateTypeCode>
															</gmd:dateType>
														</gmd:CI_Date>
													</gmd:date>
												</xsl:for-each>
												<xsl:if test="./citationInformation/author">
													<gmd:citedResponsibleParty>
														<gmd:CI_ResponsibleParty>
															<xsl:for-each select="./citationInformation/author">
																<gmd:organisationName>
																	<gco:CharacterString>
																		<xsl:value-of select="."/>
																	</gco:CharacterString>
																</gmd:organisationName>
															</xsl:for-each>
															<xsl:if test="./citationInformation/onlineLinkage">
																<gmd:contactInfo>
																	<gmd:CI_Contact>
																		<gmd:onlineResource>
																			<gmd:CI_OnlineResource>
																				<gmd:linkage>
																					<xsl:for-each select="./citationInformation/onlineLinkage">
																						<gmd:URL>
																							<xsl:value-of select="."/>
																						</gmd:URL>
																					</xsl:for-each>
																				</gmd:linkage>
																			</gmd:CI_OnlineResource>
																		</gmd:onlineResource>
																	</gmd:CI_Contact>
																</gmd:contactInfo>
																<gmd:role>
																	<gmd:CI_RoleCode>
																		<xsl:attribute name="codeList">
																			<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																		</xsl:attribute>
																		<xsl:attribute name="codeListValue">
																			<xsl:choose>
																				<xsl:when test="contactInformation/role">
																					<xsl:value-of select="contactInformation/role"/>
																				</xsl:when>
																				<xsl:otherwise>
																					<xsl:value-of select="'author'"/>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:attribute>
																	</gmd:CI_RoleCode>
																</gmd:role>
															</xsl:if>
														</gmd:CI_ResponsibleParty>
													</gmd:citedResponsibleParty>
												</xsl:if>
												<xsl:if test="./citationInformation/journalName">
													<gmd:series>
														<gmd:CI_Series>
															<gmd:name>
																<xsl:for-each select="./citationInformation/journalName">
																	<gco:CharacterString>
																		<xsl:value-of select="."/>
																	</gco:CharacterString>
																</xsl:for-each>
															</gmd:name>
															<xsl:if test="./citationInformation/volume">
																<gmd:issueIdentification>
																	<xsl:for-each select="./citationInformation/volume">
																		<gco:CharacterString>
																			<xsl:value-of select="."/>
																		</gco:CharacterString>
																	</xsl:for-each>
																</gmd:issueIdentification>
															</xsl:if>
															<xsl:if test="./citationInformation/page">
																<gmd:page>
																	<xsl:for-each select="./citationInformation/page">
																		<gco:CharacterString>
																			<xsl:value-of select="."/>
																		</gco:CharacterString>
																	</xsl:for-each>
																</gmd:page>
															</xsl:if>
														</gmd:CI_Series>
													</gmd:series>
												</xsl:if>
												<xsl:if test="./citationInformation/dataReportFileName">
													<gmd:otherCitationDetails>
														<xsl:for-each select="./citationInformation/dataReportFileName">
															<gco:CharacterString>
																<xsl:value-of select="."/>
															</gco:CharacterString>
														</xsl:for-each>
													</gmd:otherCitationDetails>
												</xsl:if>
												<xsl:if test="./citationInformation/doi">
													<gmd:ISSN>
														<xsl:for-each select="./citationInformation/doi">
															<gco:CharacterString>
																<xsl:value-of select="."/>
															</gco:CharacterString>
														</xsl:for-each>
													</gmd:ISSN>
												</xsl:if>
											</gmd:CI_Citation>
										</gmd:thesaurusName>
									</xsl:for-each>
								</gmd:MD_Keywords>
							</gmd:descriptiveKeywords>
						</xsl:for-each>
						<xsl:for-each select="datasetInformation/datasetAccessControl">
							<gmd:resourceConstraints>
								<gmd:MD_LegalConstraints>
									<xsl:if test="accessControl/@ID">
										<xsl:attribute name="uuid">
											<xsl:value-of select="accessControl/@ID"/>
										</xsl:attribute>
									</xsl:if>
									<gmd:accessConstraints>
										<gmd:MD_RestrictionCode>
											<xsl:attribute name="codeList">
												<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
											</xsl:attribute>
											<xsl:attribute name="codeListValue">
												<xsl:value-of select="accessControl/accessState"/>
											</xsl:attribute>
										</gmd:MD_RestrictionCode>
									</gmd:accessConstraints>
									<xsl:for-each select="accessControl/accessReleaseDate">
										<gmd:otherConstraints>
											<gco:CharacterString>
												<xsl:value-of select="concat('Release Date',': ', .)"/>
											</gco:CharacterString>
										</gmd:otherConstraints>
									</xsl:for-each>
									<xsl:for-each select="accessControl/accessPerson">
										<gmd:otherConstraints>
											<gco:CharacterString>
												<xsl:value-of select="concat('Access Contact: ', contactInformation/name)"/>
												<xsl:text> at </xsl:text>
												<xsl:value-of select="contactInformation/email"/>
											</gco:CharacterString>
										</gmd:otherConstraints>
									</xsl:for-each>
								</gmd:MD_LegalConstraints>
							</gmd:resourceConstraints>
						</xsl:for-each>
						<xsl:for-each select="datasetInformation/documentation">
							<gmd:aggregationInfo>
								<gmd:MD_AggregateInformation>
									<gmd:aggregateDataSetName>
										<gmd:CI_Citation>
											<gmd:title>
												<gco:CharacterString>
													<xsl:value-of select="./citationInformation/title"/>
												</gco:CharacterString>
											</gmd:title>
											<gmd:date>
												<gmd:CI_Date>
													<gmd:date>
														<gco:Date>
															<xsl:value-of select="./citationInformation/citationDate/date"/>
														</gco:Date>
													</gmd:date>
													<gmd:dateType>
														<gmd:CI_DateTypeCode>
															<xsl:attribute name="codeList">
																<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
															</xsl:attribute>
															<xsl:attribute name="codeListValue">
																<xsl:value-of select="./citationInformation/citationDate/dateTypeCode"/>
															</xsl:attribute>
															<xsl:value-of select="./citationInformation/citationDate/dateTypeCode"/>
														</gmd:CI_DateTypeCode>
													</gmd:dateType>
												</gmd:CI_Date>
											</gmd:date>
											<xsl:if test="./citationInformation/@ID">
												<gmd:identifier>
													<gmd:MD_Identifier>
														<gmd:code>
															<gco:CharacterString>
																<xsl:value-of select="./citationInformation/@ID"/>
															</gco:CharacterString>
														</gmd:code>
													</gmd:MD_Identifier>
												</gmd:identifier>
											</xsl:if>
											<xsl:if test="dataReportFileName">
												<gmd:otherCitationDetails>
													<xsl:value-of select="dataReportFileName"/>
												</gmd:otherCitationDetails>
											</xsl:if>
											<xsl:for-each select="./citationInformation/author">
												<gmd:citedResponsibleParty>
													<gmd:CI_ResponsibleParty>
														<gmd:individualName>
															<gco:CharacterString>
																<xsl:value-of select="."/>
															</gco:CharacterString>
														</gmd:individualName>
														<gmd:role>
															<gmd:CI_RoleCode>
																<xsl:attribute name="codeList">
																	<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																</xsl:attribute>
																<xsl:attribute name="codeListValue">
																	<xsl:value-of select="'author'"/>
																</xsl:attribute>
															</gmd:CI_RoleCode>
														</gmd:role>
													</gmd:CI_ResponsibleParty>
												</gmd:citedResponsibleParty>
											</xsl:for-each>
										</gmd:CI_Citation>
									</gmd:aggregateDataSetName>
									<gmd:associationType>
										<gmd:DS_AssociationTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#DS_AssociationTypeCode" codeListValue="crossReference"/>
									</gmd:associationType>
								</gmd:MD_AggregateInformation>
							</gmd:aggregationInfo>
						</xsl:for-each>
						<gmd:language>
							<gco:CharacterString>eng</gco:CharacterString>
						</gmd:language>
						<gmd:extent>
							<gmd:EX_Extent>
								<xsl:for-each select="datasetInformation/boundingCoordinates">
									<gmd:geographicElement>
										<gmd:EX_GeographicBoundingBox>
											<gmd:westBoundLongitude>
												<gco:Decimal>
													<xsl:value-of select="westLong"/>
												</gco:Decimal>
											</gmd:westBoundLongitude>
											<gmd:eastBoundLongitude>
												<gco:Decimal>
													<xsl:value-of select="eastLong"/>
												</gco:Decimal>
											</gmd:eastBoundLongitude>
											<gmd:southBoundLatitude>
												<gco:Decimal>
													<xsl:value-of select="southLat"/>
												</gco:Decimal>
											</gmd:southBoundLatitude>
											<gmd:northBoundLatitude>
												<gco:Decimal>
													<xsl:value-of select="northLat"/>
												</gco:Decimal>
											</gmd:northBoundLatitude>
										</gmd:EX_GeographicBoundingBox>
									</gmd:geographicElement>
								</xsl:for-each>
								<xsl:for-each select="datasetInformation/temporalExtent">
									<gmd:temporalElement>
										<gmd:EX_TemporalExtent>
											<gmd:extent>
												<gml:TimePeriod>
													<xsl:attribute name="gml:id">
														<xsl:value-of select="generate-id()"/>
													</xsl:attribute>
													<xsl:for-each select="datasetInformation/timeZone_GMT">
														<gml:description>
															<xsl:value-of select="concat('GMT Time Zone: ',.)"/>
														</gml:description>
													</xsl:for-each>
													<gml:beginPosition>
														<xsl:value-of select="startDate"/>
													</gml:beginPosition>
													<gml:endPosition>
														<xsl:value-of select="endDate"/>
													</gml:endPosition>
												</gml:TimePeriod>
											</gmd:extent>
										</gmd:EX_TemporalExtent>
									</gmd:temporalElement>
								</xsl:for-each>
							</gmd:EX_Extent>
						</gmd:extent>
						<gmd:supplementalInformation>
							<xsl:for-each select="datasetInformation/supplementalInformation">
								<gco:CharacterString>
									<xsl:value-of select="."/>
								</gco:CharacterString>
							</xsl:for-each>
						</gmd:supplementalInformation>
					</gmd:MD_DataIdentification>
				</gmd:identificationInfo>
				<gmd:dataQualityInfo>
					<gmd:DQ_DataQuality>
						<gmd:scope>
							<gmd:DQ_Scope>
								<gmd:level>
									<gmd:MD_ScopeCode>
										<xsl:attribute name="codeList">
											<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
										</xsl:attribute>
										<xsl:attribute name="codeListValue">
											<xsl:value-of select="'dataset'"/>
										</xsl:attribute>
									</gmd:MD_ScopeCode>
								</gmd:level>
							</gmd:DQ_Scope>
						</gmd:scope>
						<gmd:lineage>
							<gmd:LI_Lineage>
								<gmd:statement>
									<gco:CharacterString>
										<xsl:value-of select="concat('Data Quality',': ',datasetInformation/datasetQualityDescription)"/>
									</gco:CharacterString>
								</gmd:statement>
							</gmd:LI_Lineage>
						</gmd:lineage>
					</gmd:DQ_DataQuality>
				</gmd:dataQualityInfo>
				<xsl:for-each select="datasetInformation/datasetProcessing">
					<gmd:dataQualityInfo>
						<gmd:DQ_DataQuality>
							<gmd:scope>
								<gmd:DQ_Scope>
									<gmd:level>
										<gmd:MD_ScopeCode>
											<xsl:attribute name="codeList">
												<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
											</xsl:attribute>
											<xsl:attribute name="codeListValue">
												<xsl:value-of select="processingParameters/processingScope"/>
											</xsl:attribute>
										</gmd:MD_ScopeCode>
									</gmd:level>
								</gmd:DQ_Scope>
							</gmd:scope>
							<gmd:lineage>
								<gmd:LI_Lineage>
									<xsl:if test="processingParameters/@ID">
										<xsl:attribute name="uuid">
											<xsl:value-of select="processingParameters/@ID"/>
										</xsl:attribute>
									</xsl:if>
									<gmd:processStep>
										<LE_ProcessStep>
											<gmd:description>
												<gco:CharacterString>
													<xsl:value-of select="processingParameters/processingStep"/>
												</gco:CharacterString>
											</gmd:description>
											<xsl:for-each select="processingParameters/processingStepDate">
												<gmd:dateTime>
													<gco:DateTime>
														<xsl:value-of select="concat(.,'T','00:00:00')"/>
													</gco:DateTime>
												</gmd:dateTime>
											</xsl:for-each>
											<xsl:for-each select="processingParameters/processContact">
												<gmd:processor>
													<gmd:CI_ResponsibleParty>
														<xsl:if test="contactInformation/@ID">
															<xsl:attribute name="uuid">
																<xsl:value-of select="contactInformation/@ID"/>
															</xsl:attribute>
														</xsl:if>
														<gmd:individualName>
															<gco:CharacterString>
																<xsl:value-of select="contactInformation/name"/>
															</gco:CharacterString>
														</gmd:individualName>
														<xsl:for-each select="contactInformation/organization">
															<gmd:organisationName>
																<gco:CharacterString>
																	<xsl:value-of select="."/>
																</gco:CharacterString>
															</gmd:organisationName>
														</xsl:for-each>
														<gmd:contactInfo>
															<gmd:CI_Contact>
																<gmd:address>
																	<gmd:CI_Address>
																		<gmd:electronicMailAddress>
																			<gco:CharacterString>
																				<xsl:value-of select="contactInformation/email"/>
																			</gco:CharacterString>
																		</gmd:electronicMailAddress>
																	</gmd:CI_Address>
																</gmd:address>
															</gmd:CI_Contact>
														</gmd:contactInfo>
														<gmd:role>
															<gmd:CI_RoleCode>
																<xsl:attribute name="codeList">
																	<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
																</xsl:attribute>
																<xsl:attribute name="codeListValue">
																	<xsl:value-of select="contactInformation/role"/>
																</xsl:attribute>
															</gmd:CI_RoleCode>
														</gmd:role>
													</gmd:CI_ResponsibleParty>
												</gmd:processor>
											</xsl:for-each>
											<xsl:for-each select="processingParameters/parentDataset">
												<gmd:source>
													<gmd:LI_Source>
														<xsl:attribute name="id">
															<xsl:value-of select="."/>
														</xsl:attribute>
													</gmd:LI_Source>
												</gmd:source>
											</xsl:for-each>
										</LE_ProcessStep>
									</gmd:processStep>
								</gmd:LI_Lineage>
							</gmd:lineage>
						</gmd:DQ_DataQuality>
					</gmd:dataQualityInfo>
				</xsl:for-each>
				<gmd:dataQualityInfo>
					<gmd:DQ_DataQuality>
						<gmd:scope>
							<gmd:DQ_Scope>
								<gmd:level>
									<gmd:MD_ScopeCode>
										<xsl:attribute name="codeList">
											<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
										</xsl:attribute>
										<xsl:attribute name="codeListValue">
											<xsl:value-of select="'dataset'"/>
										</xsl:attribute>
									</gmd:MD_ScopeCode>
								</gmd:level>
							</gmd:DQ_Scope>
						</gmd:scope>
						<gmd:lineage>
							<gmd:LI_Lineage>
								<gmd:processStep>
									<gmd:LI_ProcessStep>
										<gmd:description>
											<gco:CharacterString>
												<xsl:value-of select="'Data submitted to archive.'"/>
											</gco:CharacterString>
										</gmd:description>
										<gmd:dateTime>
											<gco:DateTime>
												<xsl:value-of select="concat(metadataInformation/dateOfSubmission,'T','00:00:00')"/>
											</gco:DateTime>
										</gmd:dateTime>
									</gmd:LI_ProcessStep>
								</gmd:processStep>
							</gmd:LI_Lineage>
						</gmd:lineage>
					</gmd:DQ_DataQuality>
				</gmd:dataQualityInfo>
				<xsl:for-each select="acquisitionInformation">
					<gmi:acquisitionInformation>
						<gmi:MI_AcquisitionInformation>
							<xsl:for-each select="fieldActivity">
								<gmi:operation>
									<xsl:attribute name="uuidref">
										<xsl:value-of select="./@ID"/>
									</xsl:attribute>
								</gmi:operation>
							</xsl:for-each>
							<xsl:for-each select="platformInformation">
								<gmi:platform>
									<gmi:MI_Platform>
										<gmi:identifier>
											<gmd:MD_Identifier>
												<gmd:code>
													<gco:CharacterString>
														<xsl:value-of select="platform"/>
													</gco:CharacterString>
												</gmd:code>
											</gmd:MD_Identifier>
										</gmi:identifier>
										<gmi:description>
											<gco:CharacterString>
												<xsl:value-of select="platform"/>
											</gco:CharacterString>
										</gmi:description>
										<gmi:sponsor>
											<gmd:CI_ResponsibleParty>
												<gmd:organisationName>
													<gco:CharacterString>
														<xsl:value-of select="platformOrganization"/>
													</gco:CharacterString>
												</gmd:organisationName>
												<gmd:role>
													<gmd:CI_RoleCode>
														<xsl:attribute name="codeList">
															<xsl:value-of select="'http://www.ngdc.noaa.gov/mgg/ecs/metadata/seismic/controlledvocabulary.html'"/>
														</xsl:attribute>
														<xsl:attribute name="codeListValue">
															<xsl:value-of select="'owner'"/>
														</xsl:attribute>
														<xsl:value-of select="'owner'"/>
													</gmd:CI_RoleCode>
												</gmd:role>
											</gmd:CI_ResponsibleParty>
										</gmi:sponsor>
										<gmi:instrument/>
									</gmi:MI_Platform>
								</gmi:platform>
							</xsl:for-each>
							<xsl:for-each select="seismicStation">
								<platform>
									<MI_Platform>
										<xsl:attribute name="id">
											<xsl:value-of select="./@ID"/>
										</xsl:attribute>
										<identifier>
											<gmd:MD_Identifier>
												<gmd:code>
													<gco:CharacterString>
														<xsl:value-of select="stationName"/>
													</gco:CharacterString>
												</gmd:code>
											</gmd:MD_Identifier>
										</identifier>
										<gmi:description>
											<gco:CharacterString>
												<xsl:value-of select="stationName"/>
											</gco:CharacterString>
										</gmi:description>
										<gmi:instrument/>
									</MI_Platform>
								</platform>
								<xsl:comment> *** seismicStation information not included in ISO *** <xsl:call-template name="copyXML"/>
								</xsl:comment>
							</xsl:for-each>
							<xsl:for-each select="seismicNavFile">
								<xsl:comment> *** seismicNavFile information not included in ISO*** <xsl:call-template name="copyXML"/>
								</xsl:comment>
							</xsl:for-each>
						</gmi:MI_AcquisitionInformation>
						<xsl:for-each select="//acquisitionParameters">
							<xsl:comment> *** acquisitionParameters not included in ISO*** <xsl:call-template name="copyXML"/>
							</xsl:comment>
						</xsl:for-each>
					</gmi:acquisitionInformation>
				</xsl:for-each>
			</xsl:for-each>
			<xsl:for-each select="//objectInformation">
				<xsl:for-each select="seismicLine">
					<xsl:comment> *** seismicLine not included in ISO *** <xsl:call-template name="copyXML"/>
					</xsl:comment>
				</xsl:for-each>
				<xsl:for-each select="seismicDataObject">
					<xsl:comment> *** seismicDataObject(s) not included in ISO *** <xsl:call-template name="copyXML"/>
					</xsl:comment>
				</xsl:for-each>
			</xsl:for-each>
		</gmi:MI_Metadata>
	</xsl:template>
	<xsl:template match="@*|node()" name="copyXML">
		<xsl:copy>
			<xsl:value-of select="name()"/>
			<xsl:text>: </xsl:text>
			<xsl:value-of select="@ID"/>
			<xsl:value-of select="@IDREF"/>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>
