Project

General

Profile

« Previous | Next » 

Revision 48902

fix bug in date format

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/conicyt2db.xsl
5 5
    <xsl:param name="parentDatasourceId"/>
6 6
    <xsl:param name="namespacePrefix"/>
7 7

  
8
    <xsl:variable name="dateFormat" select="string('dd-MM-yyyy')"/>
8
    <xsl:variable name="dateFormat" select="string('mm-DD-yyyy')"/>
9 9
    <xsl:variable name="funderID" select="concat($namespacePrefix, '::CONICYT')"/>
10 10
    <xsl:variable name="fundingId">
11 11
        <xsl:value-of select="concat($funderID,'::',.//column[@name='FUNDER STREAM LEVEL I'],'::',.//column[@name='FUNDER STREAM LEVEL II'])"/>
......
21 21
            <metadata>
22 22
                <ROWS>
23 23
                    <xsl:variable name="projectId" select="concat($namespacePrefix, '::',  normalize-space(.//column[@name='PROJECT IDENTIFIER']))"/>
24
                    <xsl:variable name="startDate" select=".//column[@name='START DATE']"/>
25
                    <xsl:variable name="endDate" select=".//column[@name='END DATE']"/>
24
                    <xsl:variable name="startDate" select="replace(.//column[@name='START DATE'],'/','-')"/>
26 25

  
26
                    <xsl:variable name="endDate" select="replace(.//column[@name='END DATE'],'/','-')"/>
27

  
27 28
                    <ROW table="projects">
28 29

  
29 30
                        <FIELD name="_dnet_resource_identifier_">
......
53 54
                        </FIELD>
54 55
                        <FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
55 56
                        <FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
56
                        <FIELD name="collectedfrom">
57
                            <xsl:value-of select="$parentDatasourceId"/>
58
                        </FIELD>
59 57

  
58

  
60 59
                        <FIELD name="oa_mandate_for_publications" type="boolean">false</FIELD>
61 60
                    </ROW>
62 61

  
......
64 63
                        <xsl:variable name="tmp">
65 64
                            <xsl:value-of select="concat(.//column[@name='DIRECTOR Apellido1'],.//column[@name='DIRECTOR Apellido2'],.//column[@name='DIRECTOR Nombre'])"/>
66 65
                        </xsl:variable>
67
                        <xsl:value-of select="utils:md5($tmp)"/>
66
                        <xsl:value-of select="concat($namespacePrefix,'::',utils:md5($tmp))"/>
68 67
                    </xsl:variable>
69 68
                    <xsl:if test="not($personId = '')">
70 69
                        <ROW table="persons">
......
92 91
                        </ROW>
93 92
                    </xsl:if>
94 93

  
95

  
96 94
                    <xsl:for-each select="tokenize(.//column[@name='PARTICIPANT INSTITUTIONS2'],';')">
97
                        <xsl:variable name="organizationId" select="utils:md5(.)"/>
95
                        <xsl:variable name="organizationId" select="concat($namespacePrefix,'::',utils:md5(normalize-space(.)))"/>
98 96
                        <ROW table = "organizations">
99 97
                            <FIELD name="_dnet_resource_identifier_">
100 98
                                <xsl:value-of select="$organizationId"/>
......
103 101
                                <xsl:value-of select="$organizationId"/>
104 102
                            </FIELD>
105 103
                            <FIELD name="legalshortname">
106
                                <xsl:value-of select="."/>
104
                                <xsl:value-of select="normalize-space(.)"/>
107 105
                            </FIELD>
108 106
                            <FIELD name="collectedfrom">
109 107
                                <xsl:value-of select="$parentDatasourceId"/>
......
121 119
                            <FIELD name="resporganization">
122 120
                                <xsl:value-of select="$organizationId"/>
123 121
                            </FIELD>
124
                            <xsl:if test="not($personId = '')">
125
                                <FIELD name="contactperson">
126
                                    <xsl:value-of select="$personId"/>
127
                                </FIELD>
128
                            </xsl:if>
129 122

  
123
                            <xsl:choose>
124

  
125
                                <xsl:when test="not($personId = '') and position() = 1">
126
                                    <FIELD name="contactperson">
127
                                        <xsl:value-of select="$personId"/>
128
                                    </FIELD>
129
                                </xsl:when>
130
                                <xsl:otherwise>
131
                                    <FIELD name="contactperson"/>
132
                                </xsl:otherwise>
133
                            </xsl:choose>
134

  
135

  
130 136
                            <FIELD name="semanticclass">participant</FIELD>
131 137
                            <FIELD name="semanticscheme">dnet:project_organization_relations</FIELD>
132 138
                        </ROW>

Also available in: Unified diff