-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlom2mods.xsl
114 lines (110 loc) · 3.57 KB
/
lom2mods.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:lom="http://ltsc.ieee.org/xsd/LOM"
xmlns:rl="http://spec.edu.ru/xsd/RUS_LOM"
xmlns="http://www.loc.gov/mods/v3"
exclude-result-prefixes="msxsl lom rl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="lom:lom">
<mods version="3.0">
<xsl:apply-templates select="lom:general"/>
<xsl:apply-templates select="lom:lifeCycle"/>
<xsl:apply-templates select="lom:technical"/>
<typeOfResource>text</typeOfResource>
</mods>
</xsl:template>
<xsl:template match="lom:general">
<xsl:apply-templates select="lom:title"/>
<xsl:apply-templates select="rl:annotation"/>
<xsl:apply-templates select="lom:description"/>
<xsl:if test="lom:keyword">
<subject>
<xsl:apply-templates select="lom:keyword"/>
</subject>
</xsl:if>
</xsl:template>
<xsl:template match="lom:lifeCycle">
<xsl:apply-templates select="rl:authorOfPublication"/>
<xsl:apply-templates select="rl:isbn"/>
<xsl:apply-templates select="rl:bbk"/>
<xsl:if test="rl:placeOfPublication or rl:publishingHouse or rl:yearOfPublication">
<originInfo>
<xsl:apply-templates select="rl:placeOfPublication"/>
<xsl:apply-templates select="rl:publishingHouse"/>
<xsl:apply-templates select="rl:yearOfPublication"/>
</originInfo>
</xsl:if>
</xsl:template>
<xsl:template match="lom:technical">
<physicalDescription>
<xsl:apply-templates select="lom:volumeEdition"/>
</physicalDescription>
</xsl:template>
<xsl:template match="rl:annotation">
<abstract type="annotation">
<xsl:value-of select="lom:string" />
</abstract>
</xsl:template>
<xsl:template match="lom:description">
<abstract type="description">
<xsl:value-of select="lom:string" />
</abstract>
</xsl:template>
<xsl:template match="lom:title">
<titleInfo>
<title>
<xsl:value-of select="lom:string" />
</title>
</titleInfo>
</xsl:template>
<xsl:template match="rl:authorOfPublication">
<name type="personal">
<namePart>
<xsl:value-of select="lom:string" />
</namePart>
<role>
<roleTerm type="text">author</roleTerm>
</role>
</name>
</xsl:template>
<xsl:template match="rl:isbn">
<identifier type="isbn">
<xsl:value-of select="lom:string" />
</identifier>
</xsl:template>
<xsl:template match="rl:bbk">
<identifier type="bbk">
<xsl:value-of select="lom:string" />
</identifier>
</xsl:template>
<xsl:template match="rl:placeOfPublication">
<place>
<placeTerm type="text">
<xsl:value-of select="lom:string" />
</placeTerm>
</place>
</xsl:template>
<xsl:template match="rl:publishingHouse">
<publisher>
<xsl:value-of select="lom:string" />
</publisher>
</xsl:template>
<xsl:template match="rl:yearOfPublication">
<dateIssued keyDate="yes" encoding="w3cdtf">
<xsl:value-of select="lom:dateTime"/>
</dateIssued>
</xsl:template>
<xsl:template match="lom:keyword">
<topic>
<xsl:value-of select="lom:string"/>
</topic>
</xsl:template>
<xsl:template match="lom:volumeEdition">
<extent>
<xsl:value-of select="."/>
</extent>
</xsl:template>
</xsl:stylesheet>