Project

General

Profile

« Previous | Next » 

Revision 43507

fixed mapping for publication and dataset action creation

View differences:

datacite2insertActions.xslt
101 101
		                                      select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname,
102 102
									                              $originalPersonId, $dateOfCollection, $dateoftransformation, normalize-space(./*[local-name() = 'creatorName']),
103 103
									                              ./*[local-name() = 'nameIdentifier'], ./*[local-name() = 'nameIdentifier']/@nameIdentifierScheme)"/>
104

  
104 105
		                        <xsl:variable name="personresult"
105
		                                      select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf', $provenance, $trust, $about)"/>
106
		                                      select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf',
107
									                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
106 108
		                        <xsl:variable name="resultperson"
107
		                                      select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor', $provenance, $trust, $about)"/>
109
		                                      select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor',
110
									                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
108 111

  
109 112
		                        <ACTION targetKey="{$personId}" targetColumnFamily="person" targetColumn="body">
110 113
			                        <xsl:value-of select="$person"/>
......
117 120
	                            </ACTION>
118 121
	                        </xsl:if>
119 122
	                    </xsl:for-each>
120
	                    <xsl:for-each select="//*[local-name()='relatedPublication']">
121 123

  
122
	                        <!-- relatedDataset ids must be in the openaire format  -->
123
	                        <xsl:variable name="publicationId" select="dnet:oafSimpleId('result', normalize-space(./@id))"/>
124

  
125
	                        <xsl:if test="string-length($publicationId) &gt; 0">
126

  
127
		                        <xsl:variable name="resultDataset"
128
		                                      select="dnet:rel($resultId, $publicationId, 'resultResult', 'publicationDataset', 'isRelatedTo', $provenance, $trust, $about)"/>
129
		                        <xsl:variable name="datasetResult"
130
		                                      select="dnet:rel($publicationId, $resultId, 'resultResult', 'publicationDataset', 'isRelatedTo', $provenance, $trust, $about)"/>
131

  
132
		                        <ACTION targetKey="{$resultId}" targetColumnFamily="resultResult_publicationDataset_isRelatedTo" targetColumn="{$publicationId}">
133
	                                <xsl:value-of select="$resultDataset"/>
134
	                            </ACTION>
135
		                        <ACTION targetKey="{$publicationId}" targetColumnFamily="resultResult_publicationDataset_isRelatedTo" targetColumn="{$resultId}">
136
	                                <xsl:value-of select="$datasetResult"/>
137
	                            </ACTION>
138
	                        </xsl:if>
139
	                    </xsl:for-each>
140

  
141 124
			            <xsl:for-each select="//*[local-name()='relatedIdentifier' and ./@relatedIdentifierType='OPENAIRE' and ./@relationType='IsSupplementTo']">
142 125

  
143 126
				            <!-- relatedDataset ids must be in the openaire format  -->
......
146 129
				            <xsl:if test="string-length($targetId) &gt; 0">
147 130

  
148 131
					            <xsl:variable name="resultDataset"
149
					                          select="dnet:rel($resultId, $targetId, 'resultResult', 'supplement', 'isSupplementTo', $provenance, $trust, $about)"/>
132
					                          select="dnet:rel($resultId, $targetId, 'resultResult', 'supplement', 'isSupplementTo',
133
						                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
150 134
					            <xsl:variable name="datasetResult"
151
					                          select="dnet:rel($targetId, $resultId, 'resultResult', 'supplement', 'isSupplementedBy', $provenance, $trust, $about)"/>
135
					                          select="dnet:rel($targetId, $resultId, 'resultResult', 'supplement', 'isSupplementedBy',
136
						                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
152 137

  
153 138
					            <ACTION targetKey="{$resultId}" targetColumnFamily="resultResult_supplement_isSupplementTo" targetColumn="$targetId">
154 139
						            <xsl:value-of select="$resultDataset"/>
......
166 151
				            <xsl:if test="string-length($datasetId) &gt; 0">
167 152

  
168 153
					            <xsl:variable name="childParent"
169
					                          select="dnet:rel($resultId, $datasetId, 'resultResult', 'part', 'isPartOf', $provenance, $trust, $about)"/>
154
					                          select="dnet:rel($resultId, $datasetId, 'resultResult', 'part', 'isPartOf',
155
						                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
170 156
					            <xsl:variable name="parentChild"
171
					                          select="dnet:rel($datasetId, $resultId, 'resultResult', 'part', 'hasPart', $provenance, $trust, $about)"/>
157
					                          select="dnet:rel($datasetId, $resultId, 'resultResult', 'part', 'hasPart',
158
						                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
172 159

  
173 160
					            <ACTION targetKey="{$resultId}" targetColumnFamily="resultResult_part_isPartOf" targetColumn="$datasetId">
174 161
						            <xsl:value-of select="$childParent"/>

Also available in: Unified diff