Commit fef992a1 authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Adding temporal extent, changes to persons

parent 9d6d759f
......@@ -759,7 +759,29 @@
</geojson>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="./gmd:temporalElement">
<temporalExtent>
<xsl:for-each select=".//gml:TimeInstant">
<xsl:if test="./gml:timePosition[@indeterminatePosition]">
<xsl:value-of select="./gml:timePosition/@indeterminatePosition"/>
</xsl:if>
<xsl:value-of select="./gml:timePosition"/>
</xsl:for-each>
<xsl:for-each select=".//gml:TimePeriod">
<xsl:text>From</xsl:text>
<xsl:if test="./gml:beginPosition[@indeterminatePosition]">
<xsl:value-of select="./gml:beginPosition/@indeterminatePosition"/>
</xsl:if>
<xsl:value-of select="./gml:beginPosition"/>
<xsl:text> to </xsl:text>
<xsl:if test="./gml:endPosition[@indeterminatePosition]">
<xsl:value-of select="./gml:endPosition/@indeterminatePosition"/>
</xsl:if>
<xsl:value-of select="./gml:endPosition"/>
</xsl:for-each>
</temporalExtent>
</xsl:for-each>
</xsl:for-each>
......@@ -941,21 +963,21 @@
"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[@codeListValue]"/>"
</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[@codeListValue]"/>"
</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="."/>",
......@@ -1040,29 +1062,29 @@
Some records contains more than one CI_ResponsibleParty which is
not valid and they will be ignored.
Same for organisationName eg. de:b86a8604-bf78-480f-a5a8-8edff5586679 -->
<xsl:variable name="organisationName" select="*[1]/gmd:organisationName[1]/(gco:CharacterString|gmx:Anchor)" as="xs:string*"/>
<xsl:variable name="individualName" select="*[1]/gmd:individualName[1]/(gco:CharacterString|gmx:Anchor)" as="xs:string*"/>
<xsl:variable name="organisationName" select="*[1]/gmd:organisationName[1]/(gco:CharacterString|gmx:Anchor)" as="xs:string"/>
<xsl:variable name="individualName" select="*[1]/gmd:individualName[1]/(gco:CharacterString|gmx:Anchor)" as="xs:string"/>
<xsl:variable name="role"
select="replace(*[1]/gmd:role/*/@codeListValue, '\s', '')"
as="xs:string?"/>
<xsl:variable name="emailAddress" select="*[1]/gmd:contactInfo[1]/gmd:CI_Contact[1]/gmd:address[1]/gmd:CI_Address[1]/gmd:electronicMailAddress[1]/(gco:CharacterString|gmx:Anchor)" as="xs:string*"/>
<xsl:if test="normalize-space($organisationName) != ''">
<!--<xsl:if test="normalize-space($organisationName) != ''">-->
<xsl:element name="Org{$fieldSuffix}">
<xsl:value-of select="$organisationName"/>
</xsl:element>
<xsl:element name="{$role}Org{$fieldSuffix}">
<xsl:value-of select="$organisationName"/>
<xsl:element name="Role{$fieldSuffix}">
<xsl:value-of select="$role"/>
</xsl:element>
</xsl:if>
<xsl:if test="normalize-space($individualName) != ''">
<!--</xsl:if>-->
<!--<xsl:if test="normalize-space($individualName) != ''">-->
<xsl:element name="Person{$fieldSuffix}">
<xsl:value-of select="$individualName"/>
</xsl:element>
<xsl:element name="{$role}Person{$fieldSuffix}">
<xsl:value-of select="$individualName"/>
<xsl:element name="Email{$fieldSuffix}">
<xsl:value-of select="$emailAddress"/>
</xsl:element>
</xsl:if>
<!--</xsl:if>-->
<xsl:choose>
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) != '' and normalize-space($emailAddress) != ''">
<xsl:element name="contact{$fieldSuffix}">{
......
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