Project

General

Profile

« Previous | Next » 

Revision 48948

getting rid of person entities #2893

View differences:

corda_h2020_2_db.xsl
77 77
							<FIELD name="optional2">
78 78
								<xsl:value-of select="./ProjectTopicDescr"/>
79 79
							</FIELD>
80
							<xsl:variable name="personSurname" select="./CoordinatorContactPerson/PersonLastName"/>
81
							<xsl:variable name="personFirstName" select="./CoordinatorContactPerson/PersonFirstName"/>
82
							<xsl:variable name="contactfullname">
83
								<xsl:choose>
84
									<xsl:when test="string-length($personFirstName) &gt; 0 and string-length($personSurname) &gt; 0">
85
										<xsl:value-of select="normalize-space(concat($personSurname, ', ', $personFirstName))"/>
86
									</xsl:when>
87
									<xsl:when test="string-length($personFirstName) &gt; 0">
88
										<xsl:value-of select="normalize-space($personFirstName)"/>
89
									</xsl:when>
90
									<xsl:when test="string-length($personSurname) &gt; 0">
91
										<xsl:value-of select="normalize-space($personSurname)"/>
92
									</xsl:when>
93
									<xsl:otherwise>
94
										<xsl:value-of select="''"/>
95
									</xsl:otherwise>
96
								</xsl:choose>
97
							</xsl:variable>
98
							<xsl:if test="string-length($contactfullname) &gt; 0">
99
								<FIELD name="contactfullname">
100
									<xsl:value-of select="$contactfullname"/>
101
								</FIELD>
102
							</xsl:if>
103
							<xsl:variable name="contactfax" select="normalize-space(./CoordinatorContactPerson/ContactFax)"/>
104
							<xsl:if test="string-length($contactfax) &gt; 0">
105
								<FIELD name="contactfax">
106
									<xsl:value-of select="$contactfax"/>
107
								</FIELD>
108
							</xsl:if>
109
							<xsl:variable name="contactphone" select="normalize-space(./CoordinatorContactPerson/ContactPhone)"/>
110
							<xsl:if test="string-length($contactphone) &gt; 0">
111
								<FIELD name="contactphone">
112
									<xsl:value-of select="$contactphone"/>
113
								</FIELD>
114
							</xsl:if>
115
							<xsl:variable name="contactemail" select="normalize-space(./CoordinatorContactPerson/ContactEmail)"/>
116
							<xsl:if test="string-length($contactemail) &gt; 0">
117
								<FIELD name="contactemail">
118
									<xsl:value-of select="$contactemail"/>
119
								</FIELD>
120
							</xsl:if>
80 121
						</ROW>
81 122

  
82
						<xsl:for-each select="./CoordinatorContactPerson">
83
							<xsl:if test="string-length(./PersonFirstName) &gt; 0 and string-length(./PersonLastName) &gt; 0">
84
								<xsl:variable name="personId" select="concat('corda__h2020::', ../ProjectId, '::', ./PersonFirstName, '_', ./PersonLastName)"></xsl:variable>
85
								<ROW table="persons">
86
									<FIELD name="_dnet_resource_identifier_">
87
										<xsl:value-of select="$personId"/>
88
									</FIELD>
89
									<FIELD name="id">
90
										<xsl:value-of select="$personId"/>
91
									</FIELD>
92
									<FIELD name="firstname">
93
										<xsl:value-of select="./PersonFirstName"/>
94
									</FIELD>
95
									<FIELD name="secondnames">
96
										<xsl:value-of select="./PersonLastName"/>
97
									</FIELD>
98
									<FIELD name="email">
99
										<xsl:value-of select="./ContactEmail"/>
100
									</FIELD>
101
									<FIELD name="collectedfrom">
102
										<xsl:value-of select="$parentDatasourceId"/>
103
									</FIELD>
104
									<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
105
									<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
106
								</ROW>
107
							</xsl:if>
108
						</xsl:for-each>
109

  
110 123
						<xsl:for-each select="./OrganisationParticipant">
111 124
							<xsl:variable name="organizationId" select="concat('corda__h2020::', ./OrganisationPIC)"/>
112 125

  
......
194 207
								</FIELD>
195 208
								<xsl:choose>
196 209
									<xsl:when test="./ParticipantOrder = 1">
197
										<FIELD name="contactperson">
198
											<xsl:value-of select="concat($projectId, '::', ..//CoordinatorContactPerson/PersonFirstName, '_', ../CoordinatorContactPerson/PersonLastName)"></xsl:value-of>
199
										</FIELD>
200 210
										<FIELD name="semanticclass">coordinator</FIELD>
201 211
									</xsl:when>
202 212
									<xsl:otherwise>
203
										<FIELD name="contactperson"></FIELD>
204 213
										<FIELD name="semanticclass">participant</FIELD>
205 214
									</xsl:otherwise>
206 215
								</xsl:choose>

Also available in: Unified diff