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

Should grab the value instead of the code for key codelists

parent 6dc53486
......@@ -209,7 +209,7 @@
<xsl:for-each select="gmd:hierarchyLevel/gmd:MD_ScopeCode/
@codeListValue[normalize-space(.) != '']">
<resourceType>
<xsl:value-of select="."/>
<xsl:value-of select="../../gmd:MD_ScopeCode[text()]"/>
</resourceType>
</xsl:for-each>
</xsl:otherwise>
......@@ -238,7 +238,7 @@
name() != 'gmd:LanguageCode'
]">
<xsl:element name="codelist_{local-name(..)}">
<xsl:value-of select="@codeListValue"/>
<xsl:value-of select="."/>
</xsl:element>
</xsl:for-each>
......@@ -263,7 +263,7 @@
<xsl:for-each select="gmd:date/gmd:CI_Date[gmd:date/*/text() != '' and
matches(gmd:date/*/text(), '[0-9]{4}.*')]">
<xsl:variable name="dateType"
select="gmd:dateType[1]/gmd:CI_DateTypeCode/@codeListValue"
select="gmd:dateType[1]/gmd:CI_DateTypeCode[text()]"
as="xs:string?"/>
<xsl:variable name="date"
select="string(gmd:date[1]/gco:Date|gmd:date[1]/gco:DateTime)"/>
......@@ -322,9 +322,9 @@
</xsl:for-each>
<xsl:for-each
select="gmd:language/gco:CharacterString|gmd:language/gmd:LanguageCode/@codeListValue">
select="gmd:language/gco:CharacterString|gmd:language/gmd:LanguageCode[@codeListValue]">
<resourceLanguage>
<xsl:value-of select="."/>
<xsl:value-of select="text(.)"/>
</resourceLanguage>
</xsl:for-each>
......@@ -532,7 +532,7 @@
<xsl:for-each
select="*/gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue[. != '']">
<accessConstraints>
<xsl:value-of select="."/>
<xsl:value-of select="../../gmd:MD_RestrictionCode[text()]"/>
</accessConstraints>
</xsl:for-each>
<xsl:for-each
......@@ -544,7 +544,7 @@
<xsl:for-each
select="*/gmd:classification/gmd:MD_ClassificationCode/@codeListValue[. != '']">
<constraintClassification>
<xsl:value-of select="."/>
<xsl:value-of select="../../gmd:MD_ClassificationCode[text()]"/>
</constraintClassification>
</xsl:for-each>
<xsl:for-each
......@@ -953,13 +953,13 @@
<xsl:for-each select=".//gmi:MI_Operation">
<operationDetails>{
"status":"<xsl:value-of select="./gmi:status/gmd:MD_ProgressCode[@codeListValue]"/>",
"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/@codeListValue"/>",
["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>
},
......@@ -974,7 +974,7 @@
<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]"/>"
"role":"<xsl:value-of select="./gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[text()]"/>"
</xsl:for-each>
],
},
......
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