Project

General

Profile

« Previous | Next » 

Revision 53679

updated transformation for core_springer2oaf to consider also information about issn, sp, ep e licence when present

View differences:

core_springer2oaf.xml
13 13
                <TITLE>core_springer2oaf</TITLE>
14 14
                <CODE>
15 15
                    <![CDATA[
16
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
17 17
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/"
18 18
    xmlns:dr="http://www.driver-repository.eu/namespace/dr"
19 19
    xmlns:dri="http://www.driver-repository.eu/namespace/dri"
......
24 24
    <xsl:param name="varOfficialName"/>
25 25
    <xsl:param name="varDataSourceId"/>
26 26

  
27

  
28

  
27
    <xsl:variable name="issn" select=".//ISSN"/>
28
    <xsl:variable name="volume" select=".//volume"/>
29
    <xsl:variable name="licence" select=".//license/URL"/>
30
    <xsl:variable name="issue" select=".//issue"/>
31
    <xsl:variable name="spage" select="normalize-space(tokenize(.//page,'-')[1])"/>
32
    <xsl:variable name="epage" select="normalize-space(tokenize(.//page,'-')[2])"/>
29 33
    <xsl:template match="publisher">
30 34
        <dc:publisher>
31 35
            <xsl:value-of select="."/>
32 36
        </dc:publisher>
33 37
    </xsl:template>
34

  
38
    <xsl:template match="license">
39
        <dc:rights>
40
            <xsl:value-of select="./URL"/>
41
        </dc:rights>
42
    </xsl:template>
35 43
    <xsl:template match="/">
36 44
        <xsl:if test="not(.//error)">
37 45
            <record>
......
46 54
                    <oaf:accessrights>OPEN</oaf:accessrights>
47 55
                    <oaf:hostedBy id="openaire____::SpringerOA"
48 56
                        name="SpringerOpen"/>
49
                   <!-- <oaf:accessrights>UNKNOWN</oaf:accessrights>
50
                    <oaf:hostedBy id="openaire____::1256f046-bf1f-4afc-8b47-d0b147148b18"
51
                        name="Unknown Repository"/>-->
52 57
                    <oaf:collectedFrom>
53 58
                        <xsl:attribute name="name">
54 59
                            <xsl:value-of select="$varOfficialName"/>
......
86 91
            <xsl:value-of select="string-join(($date[1], $date[2], $date[3]), '-')"/>
87 92
        </xsl:variable>
88 93

  
89
            <dc:date>
90
                <xsl:value-of select="$d"/>
91
            </dc:date>
94
        <dc:date>
95
            <xsl:value-of select="$d"/>
96
        </dc:date>
92 97

  
93 98

  
94 99
    </xsl:template>
......
122 127
                </dc:type>
123 128

  
124 129
                <dr:CobjCategory>0001</dr:CobjCategory>
125
                    <oaf:journal>
126
                        <xsl:value-of select="normalize-space(../container-title)"/>
127
                    </oaf:journal>
130
                <xsl:choose>
131
                    <xsl:when test="count($issn) > 0">
132
                        <oaf:journal issn="{$issn[1]}"
133
                            volq="{$volume}"
134
                            issue="{$issue}"
135
                            sp="{$spage}"
136
                            ep="{$epage}"
137
                            >
138
                    <xsl:value-of select="normalize-space(../container-title)"/>
139
                </oaf:journal>
140
                    </xsl:when>
141
                </xsl:choose>
142

  
128 143
            </xsl:when>
129 144
            <xsl:when test=". eq book-chapter">
130 145
                <dc:type>
131
            <xsl:value-of select="string('info:eu-repo/semantics/bookPart')"/>
132
        </dc:type>
146
                    <xsl:value-of select="string('info:eu-repo/semantics/bookPart')"/>
147
                </dc:type>
133 148
                <dc:type>
134 149
                    <xsl:value-of select="string('book chapter')"/>
135 150
                </dc:type>
136 151
                <dc:source>
137 152
                    <xsl:value-of select="../container-title"/>
138 153
                </dc:source>
139
                <!--  <xsl:template match="content_item">
140
        <dc:type>
141
            <xsl:value-of select="string('info:eu-repo/semantics/bookPart')"/>
142
        </dc:type>
143
        <dc:type>
144
            <xsl:value-of select="./@component_type"/>
145
        </dc:type>
146
        <xsl:choose>
147
            <xsl:when test="../book_series_metadata">
148
                <dc:source>
149
                    <xsl:value-of select="concat(normalize-space(../book_series_metadata/series_metadata/*/title), ' - ', normalize-space(../book_series_metadata/titles/title))"/>
150
                </dc:source>
151
            </xsl:when>
152
            <xsl:when test="../book_metadata">
153
                <dc:source>
154
                    <xsl:value-of select="normalize-space(../book_metadata/*/title)"/>
155
                </dc:source>
156
            </xsl:when>
157
            </xsl:choose>
158
        <dr:CobjCategory>0013</dr:CobjCategory>
159 154

  
160
    </xsl:template> -->
161 155
                <dr:CobjCategory>0013</dr:CobjCategory>
162 156
            </xsl:when>
163 157

  
164 158
        </xsl:choose>
165 159
    </xsl:template>
166 160

  
167
    <xsl:template match="downloadFileUrl">
168
        <downloadFileUrl><xsl:value-of select="."/></downloadFileUrl>
161

  
162

  
163
    <xsl:template match="subject">
164
        <dc:subject>
165
            <xsl:value-of select="."/>
166
        </dc:subject>
169 167
    </xsl:template>
170 168

  
171
   <xsl:template match="subject">
172
       <dc:subject>
173
           <xsl:value-of select="."/>
174
       </dc:subject>
175
   </xsl:template>
176

  
177 169
    <!-- Extend with new templates for additional types of publication     -->
178 170

  
179 171
    <xsl:template match="* | @*"/>
180 172

  
181 173
</xsl:stylesheet>
182 174

  
175

  
176

  
183 177
]]>
184 178
                </CODE>
185 179
            </SCRIPT>

Also available in: Unified diff