Revision 54499
Added by Miriam Baglioni over 5 years ago
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/coreuk/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" |
... | ... | |
40 | 40 |
<xsl:value-of select="./URL"/> |
41 | 41 |
</dc:rights> |
42 | 42 |
</xsl:template> |
43 |
<xsl:template name="terminate"> |
|
44 |
<xsl:message terminate="yes"> |
|
45 |
record is not compliant, transformation is interrupted. |
|
46 |
</xsl:message> |
|
47 |
</xsl:template> |
|
43 | 48 |
<xsl:template match="/"> |
44 |
<xsl:if test="not(.//error)"> |
|
45 |
<record> |
|
46 |
<header> |
|
47 |
<xsl:copy-of select="//*[local-name() = 'header']/*" copy-namespaces="no"/> |
|
48 |
<dr:dateOfTransformation> |
|
49 |
<xsl:value-of select="date:date-time()"/> |
|
50 |
</dr:dateOfTransformation> |
|
51 |
</header> |
|
52 |
<metadata> |
|
53 |
<dc:language>eng</dc:language> |
|
54 |
<oaf:accessrights>OPEN</oaf:accessrights> |
|
55 |
<oaf:hostedBy id="openaire____::SpringerOA" |
|
56 |
name="SpringerOpen"/> |
|
57 |
<oaf:collectedFrom> |
|
58 |
<xsl:attribute name="name"> |
|
59 |
<xsl:value-of select="$varOfficialName"/> |
|
60 |
</xsl:attribute> |
|
61 |
<xsl:attribute name="id"> |
|
62 |
<xsl:value-of select="$varDataSourceId"/> |
|
63 |
</xsl:attribute> |
|
64 |
</oaf:collectedFrom> |
|
49 |
<xsl:choose> |
|
50 |
<xsl:when test=".//error or string-length(.//title) = 0"> |
|
51 |
<xsl:call-template name="terminate"/> |
|
52 |
</xsl:when> |
|
53 |
<xsl:otherwise> |
|
54 |
<record> |
|
55 |
<header> |
|
56 |
<xsl:copy-of select="//*[local-name() = 'header']/*" copy-namespaces="no"/> |
|
57 |
<dr:dateOfTransformation> |
|
58 |
<xsl:value-of select="date:date-time()"/> |
|
59 |
</dr:dateOfTransformation> |
|
60 |
</header> |
|
61 |
<metadata> |
|
62 |
<dc:language>eng</dc:language> |
|
63 |
<oaf:accessrights>OPEN</oaf:accessrights> |
|
64 |
<oaf:hostedBy id="openaire____::SpringerOA" |
|
65 |
name="SpringerOpen"/> |
|
66 |
<oaf:collectedFrom> |
|
67 |
<xsl:attribute name="name"> |
|
68 |
<xsl:value-of select="$varOfficialName"/> |
|
69 |
</xsl:attribute> |
|
70 |
<xsl:attribute name="id"> |
|
71 |
<xsl:value-of select="$varDataSourceId"/> |
|
72 |
</xsl:attribute> |
|
73 |
</oaf:collectedFrom> |
|
65 | 74 |
|
66 |
<xsl:apply-templates select=".//*"/> |
|
67 |
</metadata> |
|
68 |
<xsl:copy-of select="//*[local-name() = 'about']/*" copy-namespaces="no"/> |
|
69 |
</record> |
|
70 |
</xsl:if> |
|
75 |
<xsl:apply-templates select=".//*"/> |
|
76 |
</metadata> |
|
77 |
<xsl:copy-of select="//*[local-name() = 'about']/*" copy-namespaces="no"/> |
|
78 |
</record> |
|
79 |
</xsl:otherwise> |
|
80 |
</xsl:choose> |
|
71 | 81 |
|
72 | 82 |
</xsl:template> |
73 | 83 |
|
... | ... | |
135 | 145 |
sp="{$spage}" |
136 | 146 |
ep="{$epage}" |
137 | 147 |
> |
138 |
<xsl:value-of select="normalize-space(../container-title)"/> |
|
139 |
</oaf:journal> |
|
148 |
<xsl:value-of select="normalize-space(../container-title)"/>
|
|
149 |
</oaf:journal>
|
|
140 | 150 |
</xsl:when> |
141 | 151 |
</xsl:choose> |
142 | 152 |
|
... | ... | |
174 | 184 |
|
175 | 185 |
|
176 | 186 |
|
187 |
|
|
188 |
|
|
189 |
|
|
177 | 190 |
]]> |
178 | 191 |
</CODE> |
179 | 192 |
</SCRIPT> |
Also available in: Unified diff
do not transform records with missing titles