Revision 44352
Added by Sandro La Bruzzo over 7 years ago
3tu_transform.xml | ||
---|---|---|
14 | 14 |
<TITLE>DLI: 3tu to Scholix transform</TITLE> |
15 | 15 |
<CODE><![CDATA[<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
16 | 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/" |
|
17 |
xmlns:oaf="http://namespace.dnet.eu/oaf" xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
19 | 18 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
20 |
exclude-result-prefixes="xsl datetime exslt"> |
|
19 |
xmlns:dnet="eu.dnetlib.miscutils.functional.xml.DnetXsltFunctions" |
|
20 |
xmlns:dli="eu.dnetlib.dli.DLIUtils" |
|
21 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
22 |
exclude-result-prefixes="xsl datetime dnet dli exslt"> |
|
21 | 23 |
<xsl:template match="/"> |
22 | 24 |
<record> |
25 |
<xsl:variable name="source"> |
|
26 |
<xsl:value-of select="//dri:datasourceprefix"/> |
|
27 |
</xsl:variable> |
|
28 |
<xsl:variable name="id" select="//*[local-name() = 'dataset']/@doi"/> |
|
29 |
<xsl:variable name="doitype" select="//*[local-name() = 'column' and ./@name = 'db']"/> |
|
30 |
<xsl:variable name="datasourceprefix" select="//dri:datasourceprefix"/> |
|
31 |
|
|
23 | 32 |
<xsl:copy-of select="//*[local-name()='header']"/> |
24 |
|
|
25 |
<xsl:variable name="source" ><xsl:value-of select="//dri:datasourceprefix"/></xsl:variable> |
|
26 |
<xsl:variable name="id" select="//*[local-name()='dataset']/@doi"></xsl:variable> |
|
27 |
<xsl:variable name="doitype" select="//*[local-name()='column' and ./@name='db']"></xsl:variable> |
|
28 | 33 |
<metadata> |
29 |
<scholix:link xmlns:scholix="http://www.scholix.org" >
|
|
34 |
<scholix:link xmlns:scholix="http://www.scholix.org"> |
|
30 | 35 |
<assertion_info> |
31 |
<source><xsl:value-of select="$source"/></source> |
|
36 |
<source> |
|
37 |
<xsl:value-of select="$source"/> |
|
38 |
</source> |
|
32 | 39 |
<relationType scheme="datacite">unknown</relationType> |
33 | 40 |
</assertion_info> |
34 | 41 |
<source> |
35 | 42 |
<pid> |
36 |
<xsl:attribute name="type"><xsl:value-of select="doi"/></xsl:attribute> |
|
37 |
<xsl:value-of select="$id"/></pid> |
|
43 |
<xsl:attribute name="type"> |
|
44 |
<xsl:value-of select="string('doi')"/> |
|
45 |
</xsl:attribute> |
|
46 |
<xsl:value-of select="$id"/> |
|
47 |
</pid> |
|
38 | 48 |
<type>dataset</type> |
39 | 49 |
</source> |
40 | 50 |
|
41 | 51 |
<target> |
42 |
<pid type ="url"> |
|
43 |
<xsl:value-of select="//link/@uri"/></pid> |
|
52 |
<pid type="url"> |
|
53 |
<xsl:value-of select="//link/@uri"/> |
|
54 |
</pid> |
|
44 | 55 |
<type>unknown</type> |
45 | 56 |
</target> |
46 | 57 |
</scholix:link> |
47 | 58 |
</metadata> |
48 | 59 |
<oaf:about> |
49 | 60 |
<oaf:datainfo> |
61 |
|
|
62 |
<oaf:collectedFrom completionStatus="incomplete"> |
|
63 |
<xsl:attribute name="id"><xsl:value-of select="dli:getIdFromDataSourcePrefix($source)"/> </xsl:attribute> |
|
64 |
<xsl:attribute name="name"><xsl:value-of select="dli:getNameFromDataSourcePrefix($source)"/> </xsl:attribute> |
|
65 |
</oaf:collectedFrom> |
|
66 |
|
|
50 | 67 |
<oaf:completionStatus>incomplete</oaf:completionStatus> |
51 | 68 |
<oaf:provisionMode>collected</oaf:provisionMode> |
52 | 69 |
</oaf:datainfo> |
53 | 70 |
</oaf:about> |
54 | 71 |
</record> |
55 | 72 |
</xsl:template> |
56 |
</xsl:stylesheet>]]></CODE> |
|
73 |
</xsl:stylesheet> |
|
74 |
]]></CODE> |
|
57 | 75 |
</SCRIPT> |
58 | 76 |
</CONFIGURATION> |
59 | 77 |
<STATUS/> |
Also available in: Unified diff
fixed bug