Revision 44352
Added by Sandro La Bruzzo over 7 years ago
elsevier_transform.xml | ||
---|---|---|
12 | 12 |
<IMPORTED/> |
13 | 13 |
<SCRIPT> |
14 | 14 |
<TITLE>DLI: Elsevier to Scholix transform</TITLE> |
15 |
<CODE><![CDATA[ |
|
16 |
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
17 |
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" |
|
18 |
xmlns:oaf="http://namespace.dnet.eu/oaf" |
|
19 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
20 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
21 |
exclude-result-prefixes="xsl datetime exslt"> |
|
22 |
<xsl:template match="/"> |
|
23 |
<record> |
|
24 |
<xsl:copy-of select="//*[local-name()='header']"/> |
|
15 |
<CODE><![CDATA[<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
16 |
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" |
|
17 |
xmlns:oaf="http://namespace.dnet.eu/oaf" |
|
18 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
19 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
20 |
xmlns:dnet="eu.dnetlib.dli.DLIUtils" |
|
21 |
xmlns:scholix="http://www.scholix.org" |
|
22 |
exclude-result-prefixes="xsl datetime exslt dnet"> |
|
23 |
<xsl:template match="/"> |
|
24 |
<record> |
|
25 |
<xsl:variable name="test"><xsl:value-of select="dnet:generateDSMap()"/></xsl:variable> |
|
26 |
<xsl:copy-of select="//*[local-name()='header']"/> |
|
25 | 27 |
|
26 |
<xsl:variable name="source" ><xsl:value-of select="//dri:datasourceprefix"/></xsl:variable>
|
|
27 |
<metadata>
|
|
28 |
<scholix:link xmlns:scholix="http://www.scholix.org" >
|
|
29 |
<assertion_info>
|
|
30 |
<source><xsl:value-of select="$source"/></source>
|
|
31 |
<relationType scheme="datacite">unknown</relationType>
|
|
32 |
</assertion_info>
|
|
33 |
<source>
|
|
34 |
<pid type="DOI"><xsl:value-of select="//column[./@name='ArticleID']"/></pid>
|
|
35 |
<type>publication</type>
|
|
36 |
</source>
|
|
28 |
<xsl:variable name="source" ><xsl:value-of select="//dri:datasourceprefix"/></xsl:variable>
|
|
29 |
<metadata>
|
|
30 |
<scholix:link>
|
|
31 |
<assertion_info>
|
|
32 |
<source><xsl:value-of select="$source"/></source>
|
|
33 |
<relationType scheme="datacite">unknown</relationType>
|
|
34 |
</assertion_info>
|
|
35 |
<source>
|
|
36 |
<pid type="DOI"><xsl:value-of select="//column[./@name='ArticleID']"/></pid>
|
|
37 |
<type>publication</type>
|
|
38 |
</source>
|
|
37 | 39 |
|
38 |
<target> |
|
39 |
<pid> |
|
40 |
<xsl:attribute name="type"><xsl:value-of select="//column[./@name='db']"/></xsl:attribute> |
|
41 |
<xsl:value-of select="//column[./@name='datasetID']"/></pid> |
|
42 |
<type>dataset</type> |
|
43 |
</target> |
|
44 |
</scholix:link> |
|
45 |
</metadata> |
|
46 |
<oaf:about> |
|
47 |
<oaf:datainfo> |
|
48 |
<oaf:completionStatus>incomplete</oaf:completionStatus> |
|
49 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
50 |
</oaf:datainfo> |
|
51 |
</oaf:about> |
|
52 |
</record> |
|
53 |
</xsl:template> |
|
40 |
<target> |
|
41 |
<pid> |
|
42 |
<xsl:attribute name="type"><xsl:value-of select="//column[./@name='db']"/></xsl:attribute> |
|
43 |
<xsl:value-of select="//column[./@name='datasetID']"/></pid> |
|
44 |
<type>dataset</type> |
|
45 |
</target> |
|
46 |
</scholix:link> |
|
47 |
</metadata> |
|
48 |
<oaf:about> |
|
49 |
<oaf:datainfo> |
|
50 |
<xsl:variable name="datasourcePrefix"><xsl:value-of select="//dri:datasourceprefix/text()"/> </xsl:variable> |
|
51 |
|
|
52 |
<oaf:collectedFrom completionStatus="incomplete"> |
|
53 |
<xsl:attribute name="id"><xsl:value-of select="dnet:getIdFromDataSourcePrefix($datasourcePrefix)"/> </xsl:attribute> |
|
54 |
<xsl:attribute name="name"><xsl:value-of select="dnet:getNameFromDataSourcePrefix($datasourcePrefix)"/> </xsl:attribute> |
|
55 |
</oaf:collectedFrom> |
|
56 |
|
|
57 |
<oaf:completionStatus>incomplete</oaf:completionStatus> |
|
58 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
59 |
</oaf:datainfo> |
|
60 |
</oaf:about> |
|
61 |
</record> |
|
62 |
</xsl:template> |
|
54 | 63 |
</xsl:stylesheet> |
55 | 64 |
]]></CODE> |
56 | 65 |
</SCRIPT> |
Also available in: Unified diff
fixed bug