Project

General

Profile

« Previous | Next » 

Revision 53355

Considering creators and contributors that are not entities anymore + code reformatted

View differences:

claims_openaire_2_OAF.xml
1 1
<RESOURCE_PROFILE>
2
    <HEADER>
3
        <RESOURCE_IDENTIFIER value="b32acb71-c844-464a-8992-dfc804519a5e_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
4
        <RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
5
        <RESOURCE_KIND value="TransformationRuleDSResources"/>
6
        <RESOURCE_URI value=""/>
7
        <DATE_OF_CREATION value="2017-07-03T12:14:22+01:00"/>
8
    </HEADER>
9
    <BODY>
10
        <CONFIGURATION>
11
            <IMPORTED/>
12
            <SCRIPT>
13
                <TITLE>claims_openaire_2_OAF</TITLE>
14
                <CODE><![CDATA[<xsl:stylesheet xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="b32acb71-c844-464a-8992-dfc804519a5e_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
4
		<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
5
		<RESOURCE_KIND value="TransformationRuleDSResources"/>
6
		<RESOURCE_URI value=""/>
7
		<DATE_OF_CREATION value="2017-07-03T12:14:22+01:00"/>
8
	</HEADER>
9
	<BODY>
10
		<CONFIGURATION>
11
			<IMPORTED/>
12
			<SCRIPT>
13
				<TITLE>claims_openaire_2_OAF</TITLE>
14
				<CODE><![CDATA[<xsl:stylesheet xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"
15 15
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16 16
    xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
17 17
    xmlns:oai="http://www.openarchives.org/OAI/2.0/"
......
73 73
            <oai:metadata>
74 74
                <xsl:apply-templates/>
75 75
                <!-- Ordered creators (M) -->
76
                <xsl:call-template name="orderedAuthors"/>
76
                <xsl:call-template name="orderedAuthorsInRels"/>
77
                <xsl:call-template name="orderedAuthorsInCreators"/>
77 78
                <xsl:call-template name="oafFields"/>
78 79
            </oai:metadata>
79 80
            <xsl:copy-of select="//*[local-name() = 'about']" copy-namespaces="no"/>
......
82 83

  
83 84

  
84 85
    <!-- Creators (M) -->
85
    <xsl:template name="orderedAuthors">
86
    <xsl:template name="orderedAuthorsInRels">
86 87
        <xsl:for-each select="//oaf:result//rel[./to/@class = 'hasAuthor']">
87 88
            <xsl:sort select="ranking"/>
88 89
            <dc:creator>
......
91 92
        </xsl:for-each>
92 93
    </xsl:template>
93 94

  
95
    <!-- Creators (M) when they are not as linked entities -->
96
    <xsl:template name="orderedAuthorsInCreators">
97
        <xsl:for-each select="//oaf:result/creator">
98
            <xsl:sort select="./@rank"/>
99
            <dc:creator>
100
                <xsl:value-of select="./text()"/>
101
            </dc:creator>
102
        </xsl:for-each>
103
    </xsl:template>
104

  
94 105
    <!-- Titles (M): based on title/@classname <dc:title>main title:subtitle</dc:title>
95 106
												<dc:title>alternative title</dc:title> <dc:title>translated title</dc:title>
96 107
												We have only "main title" for now: let's keep it simple here... -->
......
100 111
        </dc:title>
101 112
    </xsl:template>
102 113

  
103
    <!-- Contributors (R) not currently available -->
114
    <!-- Contributors (R)  -->
104 115
    <xsl:template match="//oaf:result//rel[./to/@class = 'hasContributor']">
105 116
        <dc:contributor>
106 117
            <xsl:value-of select="./fullname"/>
107 118
        </dc:contributor>
108 119
    </xsl:template>
120
    <xsl:template match="//oaf:result/contributor">
121
        <dc:contributor>
122
            <xsl:value-of select="./text()"/>
123
        </dc:contributor>
124
    </xsl:template>
109 125

  
126

  
127
    <!-- Let's not keep the original ids, only the PIDs -->
110 128
    <!--
111 129
    <xsl:template match="//oaf:result/originalId/text()">
112 130
        <dc:identifier><xsl:value-of select="normalize-space(.)"/></dc:identifier>
113 131
    </xsl:template>
114 132
    -->
115 133

  
116
    <!-- Alternative Identifier (R), idType from pid@classid <dc:relation>
117
												info:eu-repo/semantics/altIdentifier/[idType]/[ID] </dc:relation> -->
134
    <!--
135
        Alternative Identifier (R), idType from pid@classid
136
        <dc:relation>info:eu-repo/semantics/altIdentifier/[idType]/[ID]</dc:relation>
137
    -->
118 138
    <xsl:template match="//oaf:result/pid[./text()]">
119 139
        <dc:relation>
120 140
            <xsl:value-of
......
128 148
        </dc:identifier>
129 149
    </xsl:template>
130 150

  
131
    <!-- Subjects (M w A) <dc:subject>bag of words</dc:subject> If subject@classname
132
												!= keywords, then we have a classification scheme to encode <dc:subject>info:eu-repo/classification/[scheme]/[value]</dc:subject>
133
												<dc:subject>info:eu-repo/classification/dcc/whatever</dc:subject> -->
151
    <!--
152
        Subjects (M w A) <dc:subject>bag of words</dc:subject>
153
        If subject@classname != keywords, then we have a classification scheme to encode
154
        <dc:subject>info:eu-repo/classification/[scheme]/[value]</dc:subject>
155
        <dc:subject>info:eu-repo/classification/dcc/whatever</dc:subject>
156
    -->
134 157
    <xsl:template match="//oaf:result/subject[@classname = 'keyword']">
135 158
        <dc:subject>
136 159
            <xsl:value-of select="normalize-space(./text())"/>
......
170 193
        </dc:type>
171 194
    </xsl:template>
172 195

  
173
    <!-- Format (R), in theory from format, not sure we are filling it
174
												<dc:format>mediaType of the digital manifestation of the resource</dc:format>
175
												<dc:format>application/pdf</dc:format> -->
196
    <!--
197
        Format (R), in theory from format, not sure we are filling it
198
		<dc:format>mediaType of the digital manifestation of the resource</dc:format>
199
		<dc:format>application/pdf</dc:format>
200
    -->
176 201
    <xsl:template match="//oaf:result/format/text()">
177 202
        <dc:format>
178 203
            <xsl:value-of select="normalize-space(.)"/>
......
235 260

  
236 261
</xsl:stylesheet>
237 262
]]></CODE>
238
            </SCRIPT>
239
        </CONFIGURATION>
240
        <STATUS/>
241
        <SECURITY_PARAMETERS/>
242
    </BODY>
263
			</SCRIPT>
264
		</CONFIGURATION>
265
		<STATUS/>
266
		<SECURITY_PARAMETERS/>
267
	</BODY>
243 268
</RESOURCE_PROFILE>

Also available in: Unified diff