Revision 49148
Added by Claudio Atzori about 7 years ago
datacite2insertActions.xslt | ||
---|---|---|
40 | 40 |
<xsl:if test="string-length($resultId) > 0"> |
41 | 41 |
<xsl:variable name="originalids" |
42 | 42 |
select="//*[local-name() = 'resource']/*[local-name()='identifier'] | //*[local-name() = 'resource']//*[local-name()='alternateIdentifier']"/> |
43 |
<xsl:variable name="creators" select="//*[local-name() = 'creator']/*[local-name() = 'creatorName']"/> |
|
43 | 44 |
<xsl:variable name="titles" select="//*[local-name() = 'title']"/> |
44 | 45 |
<xsl:variable name="subjects" select="//*[local-name() = 'subject']"/> |
45 | 46 |
<xsl:variable name="publisher" select="//*[local-name() = 'publisher']"/> |
... | ... | |
50 | 51 |
<xsl:variable name="formats" select="//*[local-name() = 'format']"/> |
51 | 52 |
<xsl:variable name="sizes" select="//*[local-name() = 'size']"/> |
52 | 53 |
<xsl:variable name="rights" select="//oaf:accessrights"/> |
54 |
<xsl:variable name="license" select="//oaf:license"/> |
|
53 | 55 |
<xsl:variable name="version" select="//*[local-name() = 'version']"/> |
54 | 56 |
<xsl:variable name="language" select="//oaf:language"/> |
55 | 57 |
<xsl:variable name="cobjcategory" select="//dr:CobjCategory"/> |
... | ... | |
83 | 85 |
select="//*[local-name() = 'resource']//*[local-name()='identifier'or local-name()='alternateIdentifier']"/> |
84 | 86 |
|
85 | 87 |
<xsl:variable name="result" |
86 |
select="dnet:odfResult($resultId, $about, $metadata, $titles, $subjects, $publisher, $descriptions, |
|
87 |
$dates, $dateaccepted, $resourceType, $formats, $sizes, $language, $cobjcategory, $contributor, $rights, |
|
88 |
select="dnet:odfResult($resultId, $about, $metadata, $titles, $creators, $subjects, $publisher, $descriptions,
|
|
89 |
$dates, $dateaccepted, $resourceType, $formats, $sizes, $language, $cobjcategory, $contributor, $rights, $license,
|
|
88 | 90 |
$version, $pids, $provenance, $trust, $hostedbyid, $hostedbyname, $collectedfromid, |
89 | 91 |
$collectedfromname, $originalids, $instanceURI, $dateOfCollection, $dateoftransformation)"/> |
90 | 92 |
|
... | ... | |
94 | 96 |
<xsl:value-of select="$result"/> |
95 | 97 |
</QUALIFIER> |
96 | 98 |
</ROW> |
97 |
<xsl:for-each select="//*[local-name() = 'creator']"> |
|
98 |
|
|
99 |
<xsl:variable name="personIdTemp"> |
|
100 |
<xsl:choose> |
|
101 |
<xsl:when test="string-length(./*[local-name() = 'nameIdentifier']) > 0"> |
|
102 |
<xsl:value-of |
|
103 |
select="translate(normalize-space(./*[local-name() = 'nameIdentifier']),' .,','___')"/> |
|
104 |
</xsl:when> |
|
105 |
<xsl:otherwise> |
|
106 |
<xsl:value-of select="translate(normalize-space(./*[local-name() = 'creatorName']),' .,','___')"/> |
|
107 |
</xsl:otherwise> |
|
108 |
</xsl:choose> |
|
109 |
</xsl:variable> |
|
110 |
|
|
111 |
<xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, normalize-space($personIdTemp))"/> |
|
112 |
|
|
113 |
<xsl:variable name="originalPersonId"> |
|
114 |
<xsl:choose> |
|
115 |
<xsl:when test="./*[local-name() = 'nameIdentifier']"> |
|
116 |
<xsl:value-of select="./*[local-name() = 'nameIdentifier'][0]"/> |
|
117 |
</xsl:when> |
|
118 |
<xsl:otherwise> |
|
119 |
<xsl:value-of select="''"/> |
|
120 |
</xsl:otherwise> |
|
121 |
</xsl:choose> |
|
122 |
</xsl:variable> |
|
123 |
|
|
124 |
<xsl:variable name="nameIdentifier"> |
|
125 |
<xsl:choose> |
|
126 |
<xsl:when test="./*[local-name() = 'nameIdentifier']"> |
|
127 |
<xsl:value-of select="./*[local-name() = 'nameIdentifier'][0]"/> |
|
128 |
</xsl:when> |
|
129 |
<xsl:otherwise> |
|
130 |
<xsl:value-of select="''"/> |
|
131 |
</xsl:otherwise> |
|
132 |
</xsl:choose> |
|
133 |
</xsl:variable> |
|
134 |
<xsl:variable name="nameIdentifierScheme"> |
|
135 |
<xsl:choose> |
|
136 |
<xsl:when test="./*[local-name() = 'nameIdentifier']"> |
|
137 |
<xsl:value-of select="./*[local-name() = 'nameIdentifier'][0]/@nameIdentifierScheme"/> |
|
138 |
</xsl:when> |
|
139 |
<xsl:otherwise> |
|
140 |
<xsl:value-of select="''"/> |
|
141 |
</xsl:otherwise> |
|
142 |
</xsl:choose> |
|
143 |
</xsl:variable> |
|
144 |
|
|
145 |
<xsl:if test="string-length($personId) > 0"> |
|
146 |
<xsl:variable name="position" select="position()"/> |
|
147 |
<xsl:variable name="person" |
|
148 |
select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname, |
|
149 |
$originalPersonId, $dateOfCollection, $dateoftransformation, normalize-space(./*[local-name() = 'creatorName']), |
|
150 |
$nameIdentifier, $nameIdentifierScheme)"/> |
|
151 |
<xsl:variable name="personresult" |
|
152 |
select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf', |
|
153 |
$collectedfromid, $collectedfromname, $provenance, $trust, $about)"/> |
|
154 |
<xsl:variable name="resultperson" |
|
155 |
select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor', |
|
156 |
$collectedfromid, $collectedfromname, $provenance, $trust, $about)"/> |
|
157 |
|
|
158 |
<ROW key="{$personId}" columnFamily="person"> |
|
159 |
<QUALIFIER name="body" type="base64"> |
|
160 |
<xsl:value-of select="$person"/> |
|
161 |
</QUALIFIER> |
|
162 |
</ROW> |
|
163 |
<ROW key="{$personId}" columnFamily="personResult_authorship_isAuthorOf"> |
|
164 |
<QUALIFIER name="{$resultId}" type="base64"> |
|
165 |
<xsl:value-of select="$personresult"/> |
|
166 |
</QUALIFIER> |
|
167 |
</ROW> |
|
168 |
<ROW key="{$resultId}" columnFamily="personResult_authorship_hasAuthor"> |
|
169 |
<QUALIFIER name="{$personId}" type="base64"> |
|
170 |
<xsl:value-of select="$resultperson"/> |
|
171 |
</QUALIFIER> |
|
172 |
</ROW> |
|
173 |
</xsl:if> |
|
174 |
</xsl:for-each> |
|
175 |
|
|
176 | 99 |
<xsl:for-each select="//*[local-name()='projectid']"> |
177 | 100 |
|
178 | 101 |
<xsl:variable name="projectId" |
Also available in: Unified diff
getting rid of person entities