Revision 55456
Added by Alessia Bardi almost 5 years ago
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/xslt_cleaning_ORP-biotools.xml | ||
---|---|---|
11 | 11 |
<IMPORTED/> |
12 | 12 |
<SCRIPT> |
13 | 13 |
<TITLE>xslt_cleaning_ORP-biotools</TITLE> |
14 |
<CODE><![CDATA[
|
|
14 |
<CODE> |
|
15 | 15 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:datacite="http://datacite.org/schema/kernel-4" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy" xmlns:dr="http://www.driver-repository.eu/namespace/dr" exclude-result-prefixes="TransformationFunction" extension-element-prefixes="TransformationFunction" version="2.0"> |
16 | 16 |
<xsl:function as="xs:anyAtomicType*" name="functx:value-intersect"> |
17 | 17 |
<xsl:param as="xs:anyAtomicType*" name="arg1"/> |
... | ... | |
65 | 65 |
<datacite:alternateIdentifiers><!-- landing page, documentation, distribution --> |
66 | 66 |
<datacite:alternateIdentifier> |
67 | 67 |
<xsl:attribute name="alternateIdentifierType" select="'LandingPage'"/> |
68 |
<xsl:value-of select="concat('https://bio.tools/', //*[local-name() = 'id'])"/>
|
|
68 |
<xsl:value-of select="concat('https://bio.tools/', //*[local-name() = 'biotoolsID'])"/>
|
|
69 | 69 |
</datacite:alternateIdentifier><!-- |
70 | 70 |
<xsl:for-each select="distinct-values((//*[local-name() = 'link'][./*[local-name() = 'type' and . = 'Repository']]/*[local-name() = 'url'], //*[local-name() = 'link'][./*[local-name() = 'url' and starts-with(., 'https://github.com/')]]/*[local-name() = 'url']/replace(., '(https://github.com/[^/]*/[^/]*)(/.*)?', '$1')))"> |
71 | 71 |
--> |
72 |
<!-- |
|
72 | 73 |
<xsl:for-each select="distinct-values((//*[local-name() = 'link'][./*[local-name() = 'type' and . = 'Repository']]/*[local-name() = 'url'], //*[starts-with(., 'https://github.com/') and contains(., concat('/', //*[local-name() = 'id']))]/replace(., '(https://github.com/[^/]*/[^/]*)(/.*)?', '$1')))"> |
73 | 74 |
<datacite:alternateIdentifier> |
74 | 75 |
<xsl:attribute name="alternateIdentifierType" select="'DistributionLocation'"/> |
75 | 76 |
<xsl:value-of select="."/> |
76 | 77 |
</datacite:alternateIdentifier> |
77 |
</xsl:for-each><!-- identifier --> |
|
78 |
|
|
79 |
</xsl:for-each>--><!-- identifier --> |
|
78 | 80 |
<datacite:alternateIdentifier> |
79 |
<xsl:attribute name="alternateIdentifierType" select="'local accession id'"/>
|
|
80 |
<xsl:value-of select="//*[local-name() = 'id']"/>
|
|
81 |
<xsl:attribute name="alternateIdentifierType" select="'biotoolsID'"/>
|
|
82 |
<xsl:value-of select="//*[local-name() = 'biotoolsID']"/>
|
|
81 | 83 |
</datacite:alternateIdentifier> |
82 | 84 |
</datacite:alternateIdentifiers> |
83 | 85 |
<datacite:identifier> |
84 | 86 |
<xsl:attribute name="identifierType" select="'URL'"/> |
85 |
<xsl:value-of select="concat('https://bio.tools/', //*[local-name() = 'id'])"/>
|
|
87 |
<xsl:value-of select="concat('https://bio.tools/', //*[local-name() = 'biotoolsID'])"/>
|
|
86 | 88 |
</datacite:identifier><!-- title --> |
87 | 89 |
<datacite:titles> |
88 | 90 |
<datacite:title> |
... | ... | |
286 | 288 |
</xsl:for-each> |
287 | 289 |
</xsl:template> |
288 | 290 |
</xsl:stylesheet> |
289 |
]]> |
|
290 | 291 |
</CODE> |
291 | 292 |
</SCRIPT> |
292 | 293 |
</CONFIGURATION> |
Also available in: Unified diff
#4187: id is now biotoolsID