This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sum.xml
136 lines (119 loc) · 3.62 KB
/
sum.xml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0" encoding="UTF-8"?>
<metamorph xmlns="http://www.culturegraph.org/metamorph"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1">
<meta>
<name>sum</name>
</meta>
<rules>
<data source="cg:level" name="@OK">
<not-equals string="part-dep" />
</data>
<data source="dcterms:issued" name="@year">
<regexp match="\d\d\d\d" />
</data>
<choose name="@volume">
<data source="dcterms:volume">
<regexp match="\d+" />
</data>
<data source="_id">
<constant value="X" />
</data>
</choose>
<choose name="@edition">
<data source="cg:edition">
<regexp match="\d+" />
</data>
<data source="cg:edition">
<replace pattern="\W" with="" />
<case to="lower" />
<trim />
<substring end="8" />
</data>
<data source="_id">
<constant value="X" />
</data>
</choose>
<combine name="key" value="${eki}-E-${volume}-${edition}-${year}"
reset="false">
<data source="@edition" name="edition" />
<data source="@volume" name="volume" />
<data name="eki" source="cg:eki">
<trim />
<regexp match=".{6}.*" />
<buffer />
</data>
<data source="@year" name="year" />
<data source="@OK" />
</combine>
<!-- <combine name="key" value="${oclc}-O-${volume}-${edition}-${year}" -->
<!-- reset="false"> -->
<!-- <data source="@edition" name="edition" /> -->
<!-- <data source="@volume" name="volume" /> -->
<!-- <data name="oclc" source="cg:oclc"> -->
<!-- <trim /> -->
<!-- <not-equals string="" /> -->
<!-- </data> -->
<!-- <data source="@year" name="year" /> -->
<!-- </combine> -->
<combine name="key" value="${isbn}-I-${volume}-${edition}-${year}"
reset="false">
<data source="@edition" name="edition" />
<data source="@volume" name="volume" />
<data name="isbn" source="bibo:isbn13">
<buffer />
</data>
<data source="@year" name="year" />
<data source="@OK" />
</combine>
<combine name="key" value="${title}-${vol}-${edition}-${creator}-${year}"
reset="false">
<data source="@OK" />
<combine name="title" value="${title} ${add} ${part}"
flushWith="record">
<data source="dcterms:title" name="title" />
<data source="cg:addTitle" name="add" />
<data source="cg:partTitle" name="part" />
<postprocess>
<normalize-utf8 />
<replace pattern="\W" with="" />
<case to="lower" />
<setreplace map="diacrit" />
<substring end="50" />
</postprocess>
</combine>
<data source="@year" name="year" />
<data source="@volume" name="vol" />
<data source="@edition" name="edition" />
<data source="cg:creator.name" name="creator">
<regexp match="^([\p{L}\p{M}\-]*), ([\p{L}\p{M}]*)( .*)?$"
format="${1}${2}" />
<buffer />
</data>
</combine>
</rules>
<maps>
<map name="diacrit">
<entry name="ä" value="ae" />
<entry name="ü" value="ue" />
<entry name="ö" value="oe" />
<entry name="ß" value="ss" />
<entry name="é" value="e" />
<entry name="á" value="a" />
<entry name="ë" value="e" />
<entry name="ï" value="i" />
<entry name="à" value="a" />
<entry name="è" value="e" />
<entry name="â" value="a" />
<entry name="ê" value="e" />
<entry name="å" value="a" />
<entry name="æ" value="ae" />
<entry name="ç" value="c" />
<entry name="œ" value="oe" />
<entry name="ñ" value="n" />
<entry name="š" value="s"/>
<entry name="&" value="und" />
<entry name="" value="" />
<entry name="" value="" />
</map>
</maps>
</metamorph>