Commit 24d186ec authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Add maintenance date and more MI_Acq info

parent 67d3a196
......@@ -554,7 +554,11 @@
</useLimitation>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="gmd:resourceMaintenance/gmd:MD_MaintenanceInformation[gmd:dateOfNextUpdate/*/text() != '']">
<dateOfNextUpdate>
<xsl:value-of select="string(gmd:dateOfNextUpdate[1]/gco:Date|gmd:dateOfNextUpdate[1]/gco:DateTime)"/>
</dateOfNextUpdate>
</xsl:for-each>
<xsl:for-each select="gmd:supplementalInformation/gco:CharacterString">
<supplementalInformation>
<xsl:value-of select="."/>
......@@ -742,9 +746,9 @@
</xsl:choose>-->
<xsl:text>] }</xsl:text>
</geojson>
<!-- how to determine the average location of a poylgon? -->
<location>
</location>
<!-- how to determine the average location of a poylgon? -->
<location>
</location>
</xsl:if>
</xsl:for-each>
<xsl:for-each select=".//gmd:EX_BoundingPolygon/gmd:polygon/gml:Point">
......@@ -757,7 +761,7 @@
<xsl:value-of select="concat('[', ./gml:pos, ']')"/>-->
<xsl:text>}</xsl:text>
</geojson>
<location><xsl:value-of select="concat(
<location><xsl:value-of select="concat(
number(substring-before(./gml:pos,'&#32;')),
',',
number(substring-before(./gml:pos,'&#32;')))"/></location>
......@@ -954,60 +958,38 @@
</xsl:if>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="gmi:acquisitionInformation/*">
<xsl:for-each select="gmi:acquisitionInformation/*">
<xsl:for-each select=".//gmi:MI_Operation">
<operationDetails>{
"status":"<xsl:value-of select="./gmi:status/gmd:MD_ProgressCode[text()]"/>",
"identifier":"<xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>",
"citation":{"title":"<xsl:value-of select="./gmi:citation/gmd:CI_Citation/gmd:title/gco:CharacterString"/>",
"dates":{
<xsl:for-each select="./gmi:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:date/*/text() != '' and
matches(gmd:date/*/text(), '[0-9]{4}.*')]">
["dateType":"<xsl:value-of select="gmd:dateType[1]/gmd:CI_DateTypeCode[text()]"/>",
"date":"<xsl:value-of select="string(gmd:date[1]/gco:Date|gmd:date[1]/gco:DateTime)"/>",]
</xsl:for-each>
},
"respParties": [
<xsl:for-each select="./gmi:citation/gmd:CI_Citation/gmd:citedResponsibleParty">
<xsl:if test="./gmd:CI_ResponsibleParty/gmd:individualName">
"person":"<xsl:value-of select="./gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString"/>",
</xsl:if>
<xsl:if test="./gmd:CI_ResponsibleParty/gmd:organisationName">
"organisation":"<xsl:value-of select="./gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString"/>",
</xsl:if>
<xsl:if test="./gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress">
"email":"<xsl:value-of select="./gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress[1]/gco:CharacterString"/>",
</xsl:if>
"role":"<xsl:value-of select="./gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[text()]"/>"
</xsl:for-each>
],
},
<xsl:for-each select="./*[name() != 'gmi:platform' and name() != 'gmi:status' and name() != 'gmi:identifier' and name() != 'gmi:citation']">
"<xsl:value-of select="name()"/>":"<xsl:value-of select="."/>",
</xsl:for-each>
}</operationDetails>
<operationStatus><xsl:value-of select="./gmi:status/gmd:MD_ProgressCode[text()]"/></operationStatus>
<operationIdentifier><xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/></operationIdentifier>
<operationTitle><xsl:value-of select="./gmi:citation/gmd:CI_Citation/gmd:title/gco:CharacterString"/></operationTitle>
<xsl:for-each select="./gmi:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:date/*/text() != '' and
matches(gmd:date/*/text(), '[0-9]{4}.*')]">
<operationDateType><xsl:value-of select="gmd:dateType[1]/gmd:CI_DateTypeCode[text()]"/></operationDateType>
<operationDate><xsl:value-of select="string(gmd:date[1]/gco:Date|gmd:date[1]/gco:DateTime)"/></operationDate>
</xsl:for-each>
<xsl:apply-templates mode="index-contact" select="gmi:citation/gmd:CI_Citation/gmd:citedResponsibleParty">
<xsl:with-param name="fieldSuffix" select="'operationParty'"/>
</xsl:apply-templates>
</xsl:for-each>
<xsl:for-each select=".//gmi:MI_Platform">
<platformDetails>{
"identifier":"<xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>",
"description":"<xsl:value-of select="./gmi:description/gco:CharacterString"/>",
<xsl:for-each select="./*[name() != 'gmi:instrument' and name() != 'gmi:identifier' and name() != 'gmi:description']">
"<xsl:value-of select="name()"/>":"<xsl:value-of select="."/>",
</xsl:for-each>
}</platformDetails>
<platformIdentifier><xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/></platformIdentifier>
<platformDescription><xsl:value-of select="./gmi:description/gco:CharacterString"/></platformDescription>
<xsl:apply-templates mode="index-contact" select="gmi:sponsor">
<xsl:with-param name="fieldSuffix" select="'platformParty'"/>
</xsl:apply-templates>
</xsl:for-each>
<xsl:for-each select=".//gmi:MI_Instrument|.//MER:MI_Instrument">
<instrumentDetails>{
"identifier":"<xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>",
"type":"<xsl:value-of select="./gmi:type/gco:CharacterString"/>",
<xsl:for-each select="./*[name() != 'gmi:type' and name() != 'gmi:identifier']">
"<xsl:value-of select="name()"/>":"<xsl:value-of select="."/>",
</xsl:for-each>
}</instrumentDetails>
<instrumentIdentifier><xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/></instrumentIdentifier>
<instrumentType><xsl:value-of select="./gmi:type/gco:CharacterString"/></instrumentType>
<xsl:for-each select="./MER:history/MER:MI_InstrumentationEventList/MER:instrumentationEvent">
<instrumentEventType><xsl:value-of select="../../../gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>|<xsl:value-of select="./MER:MI_InstrumentEvent/MER:type/MER:MI_EventTypeCode"/></instrumentEventType>
<instrumentEventDesc><xsl:value-of select="../../../gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>|<xsl:value-of select="./MER:MI_InstrumentEvent/MER:description/gco:CharacterString"/></instrumentEventDesc>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
<!-- Service/dataset relation. Create document for the association.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment