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

Correcting a path. adding email address

parent 27f281d1
......@@ -135,7 +135,7 @@
To reduce the risk that our Discovery layer reads in 'citations' from things that are not actually citations,
I use a check for a controlled leading string that would be unlikely to be present in other records. -->
<document>
<xsl:if test="./gmd:identificationInfo/MER:MD_DataIdentification/gmd:citation/gmd:otherCitationDetails/gco:CharacterString[starts-with(text(),'MERIDIAN-CITE-AS: ')]">
<xsl:if test="./gmd:identificationInfo/MER:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:otherCitationDetails/gco:CharacterString[starts-with(text(),'MERIDIAN-CITE-AS: ')]">
Here is some generic text that can be used if things are working. It is generated from index.xsl right now.
</xsl:if>
</document>
......@@ -969,6 +969,7 @@
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="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:variable name="role"
select="replace(*[1]/gmd:role/*/@codeListValue, '\s', '')"
as="xs:string?"/>
......@@ -989,18 +990,40 @@
</xsl:element>
</xsl:if>
<xsl:choose>
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) != ''">
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) != '' and normalize-space($emailAddress) != ''">
<xsl:element name="contact{$fieldSuffix}">{
person:"<xsl:value-of select="replace($individualName, '&quot;', '\\&quot;')"/>",
org:"<xsl:value-of select="replace($organisationName, '&quot;', '\\&quot;')"/>",
role:"<xsl:value-of select="$role"/>",
email:"<xsl:value-of select="$emailAddress"/>"
}</xsl:element>
</xsl:when>
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) = '' and normalize-space($emailAddress) != ''">
<xsl:element name="contact{$fieldSuffix}">{
org:"<xsl:value-of select="replace($organisationName, '&quot;', '\\&quot;')"/>",
role:"<xsl:value-of select="$role"/>",
email:"<xsl:value-of select="$emailAddress"/>"
}</xsl:element>
</xsl:when>
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) = '' and normalize-space($emailAddress) = ''">
<xsl:element name="contact{$fieldSuffix}">{
org:"<xsl:value-of select="replace($organisationName, '&quot;', '\\&quot;')"/>",
role:"<xsl:value-of select="$role"/>"
}</xsl:element>
</xsl:when>
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) = ''">
<xsl:when test="normalize-space($organisationName) != '' and normalize-space($individualName) != '' and normalize-space($emailAddress) = ''">
<xsl:element name="contact{$fieldSuffix}">{
person:"<xsl:value-of select="replace($individualName, '&quot;', '\\&quot;')"/>",
org:"<xsl:value-of select="replace($organisationName, '&quot;', '\\&quot;')"/>",
role:"<xsl:value-of select="$role"/>"
}</xsl:element>
</xsl:when>
<xsl:when test="normalize-space($organisationName) = '' and normalize-space($individualName) != '' and normalize-space($emailAddress) != ''">
<xsl:element name="contact{$fieldSuffix}">{
person:"<xsl:value-of select="replace($individualName, '&quot;', '\\&quot;')"/>",
role:"<xsl:value-of select="$role"/>",
email:"<xsl:value-of select="$emailAddress"/>"
}</xsl:element>
</xsl:when>
<xsl:otherwise>
<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