Revision 48998
Added by Jochen Schirrwagen about 7 years ago
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/xslt_nlm2oaf_pmc.xml | ||
---|---|---|
33 | 33 |
<xsl:param name="index" select="0"/> |
34 | 34 |
<xsl:param name="transDate" select="current-dateTime()"/> |
35 | 35 |
<xsl:variable name="tf" select="TransformationFunction:getInstance()"/> |
36 |
<xsl:variable name="year" select="format-number(//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='year'], '0000')" />
|
|
37 |
<xsl:variable name="month" select="format-number(//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='month'], '00')" />
|
|
38 |
<xsl:variable name="day" select="format-number(//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='day'], '00')" />
|
|
36 |
<xsl:variable name="year" select="format-number( ( //*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='year'] | //*[local-name()='article-meta']//*[local-name()='pub-date'][@date-type='pub' and @publication-format='electronic']/*[local-name()='year']), '0000')" />
|
|
37 |
<xsl:variable name="month" select="format-number( (//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='month'] | //*[local-name()='article-meta']//*[local-name()='pub-date'][@date-type='pub' and @publication-format='electronic']/*[local-name()='month']), '00')" />
|
|
38 |
<xsl:variable name="day" select="format-number( (//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']/*[local-name()='day'] | //*[local-name()='article-meta']//*[local-name()='pub-date'][@date-type='pub' and @publication-format='electronic']/*[local-name()='day']), '00')" />
|
|
39 | 39 |
|
40 | 40 |
<xsl:template name="terminate"> |
41 | 41 |
<xsl:message terminate="yes"> |
... | ... | |
87 | 87 |
</xsl:element> |
88 | 88 |
<xsl:element name="oaf:dateAccepted"> |
89 | 89 |
<xsl:choose> |
90 |
<xsl:when test="//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub']" > |
|
90 |
<xsl:when test="//*[local-name()='article-meta']//*[local-name()='pub-date'][@pub-type='epub'] or //*[local-name()='article-meta']//*[local-name()='pub-date'][@date-type='pub' and @publication-format='electronic']" > |
|
91 |
|
|
91 | 92 |
<xsl:if test="string(number($month)) eq 'NaN'" > |
92 | 93 |
<xsl:value-of select="concat($year, '-', '01', '-', '01')" /> |
93 | 94 |
</xsl:if> |
Also available in: Unified diff
update nlm transformation script with date-type "pub" and publication-format "electronic"