1 |
31490
|
michele.ar
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
44685
|
sandro.lab
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3 |
48139
|
alessia.ba
|
xmlns:clean="eu.dnetlib.msro.openaireplus.utils.CleaningXsltFunctions"
|
4 |
|
|
version="1.0">
|
5 |
31490
|
michele.ar
|
|
6 |
|
|
<xsl:template match="/">
|
7 |
|
|
<ROWS>
|
8 |
48139
|
alessia.ba
|
<xsl:variable name="id" select="//FIELD[@name='id']"/>
|
9 |
|
|
<xsl:variable name="name" select="//FIELD[@name='name']"/>
|
10 |
|
|
<xsl:variable name="class" select="//FIELD[@name='class']"/>
|
11 |
44685
|
sandro.lab
|
<xsl:variable name="cleanedName">
|
12 |
|
|
<xsl:choose>
|
13 |
|
|
<xsl:when test="string-length(clean:clean($name)) >0 ">
|
14 |
|
|
<xsl:value-of select="clean:clean($name)"/>
|
15 |
|
|
</xsl:when>
|
16 |
|
|
<xsl:otherwise>
|
17 |
|
|
<xsl:value-of select="clean:clean(//FIELD[@name='englishname'])"/>
|
18 |
|
|
</xsl:otherwise>
|
19 |
|
|
</xsl:choose>
|
20 |
|
|
</xsl:variable>
|
21 |
|
|
|
22 |
|
|
<xsl:if test="string-length($cleanedName) > 0">
|
23 |
|
|
<ROW table="datacite_temp_datarepos">
|
24 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
25 |
|
|
<xsl:value-of select="$id"/>
|
26 |
|
|
</FIELD>
|
27 |
|
|
<FIELD name="id">
|
28 |
|
|
<xsl:value-of select="$id"/>
|
29 |
|
|
</FIELD>
|
30 |
|
|
<FIELD name="name">
|
31 |
|
|
<xsl:value-of select="$name"/>
|
32 |
|
|
</FIELD>
|
33 |
|
|
<FIELD name="name_cleaned">
|
34 |
|
|
<xsl:value-of select="$cleanedName"/>
|
35 |
|
|
</FIELD>
|
36 |
|
|
<FIELD name="class">
|
37 |
|
|
<xsl:value-of select="$class"/>
|
38 |
|
|
</FIELD>
|
39 |
|
|
</ROW>
|
40 |
|
|
</xsl:if>
|
41 |
|
|
|
42 |
31490
|
michele.ar
|
</ROWS>
|
43 |
|
|
</xsl:template>
|
44 |
|
|
</xsl:stylesheet>
|