forked from Islandora-Labs/islandora_ingest_forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pbcore_to_dc.xsl
84 lines (76 loc) · 3.69 KB
/
pbcore_to_dc.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/dc/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pbcore="http://www.pbcore.org/PBCore/PBCoreNamespace.html">
<xsl:output method="xml" indent="yes" />
<xsl:template match="text()" />
<xsl:template match="/">
<oai_dc:dc>
<xsl:attribute name="xmlns:xsi">http://www.w3.org/2001/XMLSchema-instance</xsl:attribute>
<xsl:attribute name="xsi:schemaLocation">http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd</xsl:attribute>
<xsl:apply-templates />
</oai_dc:dc>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreIdentifier">
<dc:identifier>
<xsl:value-of select="." />
</dc:identifier>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreTitle">
<dc:title>
<xsl:value-of select="." />
</dc:title>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreSubject">
<dc:subject>
<xsl:value-of select="." />
</dc:subject>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreDescription[@descriptionType = 'Abstract']">
<dc:description>
<xsl:value-of select="." />
</dc:description>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreGenre">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreCoverage/pbcore:coverage">
<dc:coverage>
<xsl:value-of select="." />
</dc:coverage>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreCreator">
<dc:creator>
<xsl:value-of select="pbcore:creator" /> - <xsl:value-of select="pbcore:creatorRole" />
</dc:creator>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreContributor[1]">
<dc:contributor>
<xsl:value-of select="pbcore:contributor" /> - <xsl:value-of select="pbcore:contributorRole" />
</dc:contributor>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreRightsSummary">
<dc:rights><xsl:value-of select="pbcore:rightsSummary" /></dc:rights>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreInstantiation[1]/pbcore:instantiationDate">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:template>
<xsl:template
match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreInstantiation[1]/pbcore:instantiationGenerations">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:template>
<xsl:template
match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreInstantiation[1]/pbcore:instantiationMediaType">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:template>
<xsl:template
match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreInstantiation[1]/pbcore:instantiationDuration">
<dc:format><xsl:value-of select="." /></dc:format>
</xsl:template>
<xsl:template match="/pbcore:pbcoreDescriptionDocument/pbcore:pbcoreInstantiation[1]/pbcore:instantiationLanguage">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:template>
</xsl:stylesheet>