Revision 48956
Added by Claudio Atzori about 6 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/corda_h2020_substreams_2_db.xsl | ||
---|---|---|
90 | 90 |
<FIELD name="optional2"> |
91 | 91 |
<xsl:value-of select="./ProjectTopicDescr"/> |
92 | 92 |
</FIELD> |
93 |
<xsl:variable name="personSurname" select="./CoordinatorContactPerson/PersonLastName"/> |
|
94 |
<xsl:variable name="personFirstName" select="./CoordinatorContactPerson/PersonFirstName"/> |
|
95 |
<xsl:variable name="contactfullname"> |
|
96 |
<xsl:choose> |
|
97 |
<xsl:when test="string-length($personFirstName) > 0 and string-length($personSurname) > 0"> |
|
98 |
<xsl:value-of select="normalize-space(concat($personSurname, ', ', $personFirstName))"/> |
|
99 |
</xsl:when> |
|
100 |
<xsl:when test="string-length($personFirstName) > 0"> |
|
101 |
<xsl:value-of select="normalize-space($personFirstName)"/> |
|
102 |
</xsl:when> |
|
103 |
<xsl:when test="string-length($personSurname) > 0"> |
|
104 |
<xsl:value-of select="normalize-space($personSurname)"/> |
|
105 |
</xsl:when> |
|
106 |
<xsl:otherwise> |
|
107 |
<xsl:value-of select="''"/> |
|
108 |
</xsl:otherwise> |
|
109 |
</xsl:choose> |
|
110 |
</xsl:variable> |
|
111 |
<xsl:if test="string-length($contactfullname) > 0"> |
|
112 |
<FIELD name="contactfullname"> |
|
113 |
<xsl:value-of select="$contactfullname"/> |
|
114 |
</FIELD> |
|
115 |
</xsl:if> |
|
116 |
<xsl:variable name="contactfax" select="normalize-space(./CoordinatorContactPerson/ContactFax)"/> |
|
117 |
<xsl:if test="string-length($contactfax) > 0"> |
|
118 |
<FIELD name="contactfax"> |
|
119 |
<xsl:value-of select="$contactfax"/> |
|
120 |
</FIELD> |
|
121 |
</xsl:if> |
|
122 |
<xsl:variable name="contactphone" select="normalize-space(./CoordinatorContactPerson/ContactPhone)"/> |
|
123 |
<xsl:if test="string-length($contactphone) > 0"> |
|
124 |
<FIELD name="contactphone"> |
|
125 |
<xsl:value-of select="$contactphone"/> |
|
126 |
</FIELD> |
|
127 |
</xsl:if> |
|
128 |
<xsl:variable name="contactemail" select="normalize-space(./CoordinatorContactPerson/ContactEmail)"/> |
|
129 |
<xsl:if test="string-length($contactemail) > 0"> |
|
130 |
<FIELD name="contactemail"> |
|
131 |
<xsl:value-of select="$contactemail"/> |
|
132 |
</FIELD> |
|
133 |
</xsl:if> |
|
93 | 134 |
</ROW> |
94 |
|
|
95 |
<xsl:for-each select="./CoordinatorContactPerson"> |
|
96 |
<xsl:if test="string-length(./PersonFirstName) > 0 and string-length(./PersonLastName) > 0"> |
|
97 |
<xsl:variable name="personId" select="concat('corda__h2020::', ../ProjectId, '::', ./PersonFirstName, '_', ./PersonLastName)"></xsl:variable> |
|
98 |
<ROW table="persons"> |
|
99 |
<FIELD name="_dnet_resource_identifier_"> |
|
100 |
<xsl:value-of select="$personId"/> |
|
101 |
</FIELD> |
|
102 |
<FIELD name="id"> |
|
103 |
<xsl:value-of select="$personId"/> |
|
104 |
</FIELD> |
|
105 |
<FIELD name="firstname"> |
|
106 |
<xsl:value-of select="./PersonFirstName"/> |
|
107 |
</FIELD> |
|
108 |
<FIELD name="secondnames"> |
|
109 |
<xsl:value-of select="./PersonLastName"/> |
|
110 |
</FIELD> |
|
111 |
<FIELD name="email"> |
|
112 |
<xsl:value-of select="./ContactEmail"/> |
|
113 |
</FIELD> |
|
114 |
<FIELD name="collectedfrom"> |
|
115 |
<xsl:value-of select="$parentDatasourceId"/> |
|
116 |
</FIELD> |
|
117 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
118 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
119 |
</ROW> |
|
120 |
</xsl:if> |
|
121 |
</xsl:for-each> |
|
122 |
|
|
123 | 135 |
<xsl:for-each select="./OrganisationParticipant"> |
124 | 136 |
<xsl:variable name="organizationId" select="concat('corda__h2020::', ./OrganisationPIC)"/> |
125 | 137 |
|
... | ... | |
207 | 219 |
</FIELD> |
208 | 220 |
<xsl:choose> |
209 | 221 |
<xsl:when test="./ParticipantOrder = 1"> |
210 |
<FIELD name="contactperson"> |
|
211 |
<xsl:value-of select="concat($projectId, '::', ..//CoordinatorContactPerson/PersonFirstName, '_', ../CoordinatorContactPerson/PersonLastName)"></xsl:value-of> |
|
212 |
</FIELD> |
|
213 | 222 |
<FIELD name="semanticclass">coordinator</FIELD> |
214 | 223 |
</xsl:when> |
215 | 224 |
<xsl:otherwise> |
216 |
<FIELD name="contactperson"></FIELD> |
|
217 | 225 |
<FIELD name="semanticclass">participant</FIELD> |
218 | 226 |
</xsl:otherwise> |
219 | 227 |
</xsl:choose> |
Also available in: Unified diff
project contact person moved in project's description