Commit 680406a1 authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Explicitly handling some elements of MI_Acq that always appear

parent e385c3a4
......@@ -931,7 +931,20 @@
<xsl:for-each select=".//gmi:MI_Operation">
<operationDetails>{
<xsl:for-each select="./*[name() != 'gmi:platform']">
"status":"<xsl:value-of select="./gmi:status/gmd:MD_ProgressCode[@codeListValue]"/>",
"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/@codeListValue"/>",
"date":"<xsl:value-of select="string(gmd:date[1]/gco:Date|gmd:date[1]/gco:DateTime)"/>",]
</xsl:for-each>
}},
<xsl:apply-templates mode="index-contact" select="./gmi:citation/gmd:CI_Citation/gmd:citedResponsibleParty">
<xsl:with-param name="fieldSuffix" select="'ForOperation'"/>
</xsl:apply-templates>
<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>
......@@ -939,19 +952,23 @@
<xsl:for-each select=".//gmi:MI_Platform">
<platformDetails>{
<xsl:for-each select="./*[name() != 'gmi:instrument']">
"identifier":"<xsl:value-of select="./gmi:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"/>",
"description":"<xsl:vlaue-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>
</xsl:for-each>
<xsl:for-each select=".//gmi:MI_Instrument|.//MER:MI_Instrument">
<xsl:for-each select=".//gmi:MI_Instrument|.//MER:MI_Instrument">
<instrumentDetails>{
<xsl:for-each select="./*">
"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>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
<!-- Service/dataset relation. Create document for the association.
Note: not used for indicators anymore
......
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