Revision 40708
Added by Claudio Atzori over 8 years ago
dmf2insertActions.xslt | ||
---|---|---|
17 | 17 |
<xsl:template match="/*"> |
18 | 18 |
<xsl:variable name="about" select="/*[local-name() = 'record']/*[local-name() = 'about']"/> |
19 | 19 |
<xsl:variable name="dateofcollection" select="//dr:dateOfCollection"/> |
20 |
<xsl:variable name="dateoftransformation" select="//dr:dateOfTransformation"/> |
|
20 | 21 |
|
21 | 22 |
<xsl:variable name="metadata" select="exslt:node-set(//*[local-name()='metadata']/*)"/> |
22 | 23 |
<xsl:variable name="collectedDatasourceid"> |
... | ... | |
47 | 48 |
<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)"/> |
48 | 49 |
<xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name"/> |
49 | 50 |
|
51 |
<xsl:variable name="originalidTest" select="/record/*[local-name() = 'header']/*[local-name() = 'recordIdentifier']"/> |
|
52 |
<xsl:variable name="originalid"> |
|
53 |
<xsl:choose> |
|
54 |
<xsl:when test="contains($originalidTest, '::')"> |
|
55 |
<xsl:value-of select="substring-after($originalidTest, '::')"/> |
|
56 |
</xsl:when> |
|
57 |
<xsl:otherwise> |
|
58 |
<xsl:value-of select="$originalidTest"/> |
|
59 |
</xsl:otherwise> |
|
60 |
</xsl:choose> |
|
61 |
</xsl:variable> |
|
62 |
|
|
50 | 63 |
<xsl:variable name="result" |
51 |
select="dnet:oafResult($resultId, $provenance, $trust, $about, $hostedbyid, $hostedbyname, $collectedfromid, $collectedfromname, $objidentifier, $dateofcollection, $metadata)"/> |
|
64 |
select="dnet:oafResult($resultId, $provenance, $trust, $about, $hostedbyid, $hostedbyname, |
|
65 |
$collectedfromid, $collectedfromname, $originalid, $dateofcollection, $dateoftransformation, $metadata)"/> |
|
52 | 66 |
|
53 | 67 |
<ACTIONS> |
54 | 68 |
<ACTION targetKey="{$resultId}" targetColumnFamily="result" targetColumn="body"> |
... | ... | |
91 | 105 |
<xsl:if test="string-length($personId) > 0"> |
92 | 106 |
|
93 | 107 |
<xsl:variable name="position" select="position()"/> |
108 |
<xsl:variable name="originalPersonId"> |
|
109 |
<xsl:choose> |
|
110 |
<xsl:when test="string-length(@nameIdentifier) > 0"> |
|
111 |
<xsl:value-of select="normalize-space(@nameIdentifier)"/> |
|
112 |
</xsl:when> |
|
113 |
<xsl:otherwise> |
|
114 |
<xsl:value-of select="concat($originalid, '::', normalize-space(.))"/> |
|
115 |
</xsl:otherwise> |
|
116 |
</xsl:choose> |
|
117 |
</xsl:variable> |
|
94 | 118 |
|
95 | 119 |
<xsl:variable name="person" |
96 |
select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname, $objidentifier, $dateofcollection, normalize-space(.))"/> |
|
120 |
select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname, |
|
121 |
$originalPersonId, $dateofcollection, $dateoftransformation, normalize-space(.), @nameIdentifier, @nameIdentifierScheme)"/> |
|
97 | 122 |
<xsl:variable name="personresult" |
98 | 123 |
select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf', $provenance, $trust, $about)"/> |
99 | 124 |
<xsl:variable name="resultperson" |
Also available in: Unified diff
unit test: classpath xslts updated to latest changes