Revision 48282
Added by Alessia Bardi almost 7 years ago
claims_datacite_2_ODF.xml | ||
---|---|---|
22 | 22 |
|
23 | 23 |
<xsl:output indent="yes"/> |
24 | 24 |
|
25 |
<xsl:template match="/"> |
|
26 |
<xsl:call-template name="createRecord"/> |
|
25 |
<xsl:template match="/"> |
|
26 |
<xsl:choose> |
|
27 |
<xsl:when test="string-length(//*[local-name() ='objIdentifier']) = 46 and matches(//*[local-name() ='objIdentifier'], '\w{12}')"> |
|
28 |
<xsl:call-template name="createRecord"/> |
|
29 |
</xsl:when> |
|
30 |
<xsl:otherwise> |
|
31 |
<xsl:call-template name="skipRecord"/> |
|
32 |
</xsl:otherwise> |
|
33 |
</xsl:choose> |
|
34 |
|
|
27 | 35 |
</xsl:template> |
28 | 36 |
|
37 |
<xsl:template name="skipRecord"> |
|
38 |
<oai:record> |
|
39 |
<oai:header> |
|
40 |
<xsl:copy-of select="//*[local-name() = 'header']/dri:dateOfCollection" |
|
41 |
copy-namespaces="no"/> |
|
42 |
<xsl:copy-of select="//*[local-name() = 'header']/oaf:datasourceprefix" |
|
43 |
copy-namespaces="no"/> |
|
44 |
<dri:recordIdentifier> |
|
45 |
<xsl:value-of select="//*[local-name() = 'header']/dri:objIdentifier"/> |
|
46 |
</dri:recordIdentifier> |
|
47 |
<dr:dateOfTransformation> |
|
48 |
<xsl:value-of select="date:date-time()"/> |
|
49 |
</dr:dateOfTransformation> |
|
50 |
</oai:header> |
|
51 |
<oai:metadata> |
|
52 |
<xsl:copy-of select="//*[local-name() = 'metadata']/*"/> |
|
53 |
</oai:metadata> |
|
54 |
</oai:record> |
|
55 |
</xsl:template> |
|
56 |
|
|
29 | 57 |
<xsl:template name="createRecord"> |
30 | 58 |
<oai:record> |
31 | 59 |
<oai:header> |
Also available in: Unified diff
Skip records with wrong identifiers