Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Infrastructure
iso19139.MERIDIAN
Commits
b5d3349a
Commit
b5d3349a
authored
Sep 19, 2019
by
Kim Mortimer
Browse files
Correcting a path. adding email address
parent
27f281d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/plugin/iso19139.MERIDIAN/index-fields/index.xsl
View file @
b5d3349a
...
...
@@ -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, '"', '\\"')"
/>
",
org:"
<xsl:value-of
select=
"replace($organisationName, '"', '\\"')"
/>
",
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, '"', '\\"')"
/>
",
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, '"', '\\"')"
/>
",
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, '"', '\\"')"
/>
",
org:"
<xsl:value-of
select=
"replace($organisationName, '"', '\\"')"
/>
",
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, '"', '\\"')"
/>
",
role:"
<xsl:value-of
select=
"$role"
/>
",
email:"
<xsl:value-of
select=
"$emailAddress"
/>
"
}
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element
name=
"contact{$fieldSuffix}"
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment