Project

General

Profile

« Previous | Next » 

Revision 7142

mappings/VegCore-VegBIEN.csv: taxonlabel.taxonomicname: Prepend the family to the rest of the name using new _merge_prefix() instead of _join_words()/_nullIf(), so that any input taxonomic name that includes the family will not have the family duplicated in the combined taxonomic name. Previously, the duplication was removed only when the rest of the input name was equal to the family. This change fixes a bug in the new TNRS import where a pre-concatenated taxonomic name (Accepted_scientific_name) which includes the family is now used instead of Accepted_name, which only includes it when it's equal to the family.

View differences:

test.xml.ref
56 56
                                                        <taxonlabel>
57 57
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
58 58
                                                            <taxonomicname>
59
                                                                <_join_words>
60
                                                                    <1>
61
                                                                        <_taxon_family_require_std>
62
                                                                            <family>
63
                                                                                <_nullIf>
64
                                                                                    <null>$ScientificName</null>
65
                                                                                    <value>$Family</value>
66
                                                                                </_nullIf>
67
                                                                            </family>
68
                                                                        </_taxon_family_require_std>
69
                                                                    </1>
70
                                                                    <2>
59
                                                                <_merge_prefix>
60
                                                                    <prefix><_taxon_family_require_std><family>$Family</family></_taxon_family_require_std></prefix>
61
                                                                    <value>
71 62
                                                                        <_join_words>
72 63
                                                                            <1>
73 64
                                                                                <_alt>
......
83 74
                                                                            </1>
84 75
                                                                            <2>$AuthorOfScientificName</2>
85 76
                                                                        </_join_words>
86
                                                                    </2>
87
                                                                </_join_words>
77
                                                                    </value>
78
                                                                </_merge_prefix>
88 79
                                                            </taxonomicname>
89 80
                                                        </taxonlabel>
90 81
                                                    </matched_label_id>
......
132 123
                                                        </taxonlabel>
133 124
                                                    </parent_id>
134 125
                                                    <taxonomicname>
135
                                                        <_join_words>
136
                                                            <1>
137
                                                                <_taxon_family_require_std>
138
                                                                    <family>
139
                                                                        <_nullIf>
140
                                                                            <null>$ScientificName</null>
141
                                                                            <value>$Family</value>
142
                                                                        </_nullIf>
143
                                                                    </family>
144
                                                                </_taxon_family_require_std>
145
                                                            </1>
146
                                                            <2>
126
                                                        <_merge_prefix>
127
                                                            <prefix><_taxon_family_require_std><family>$Family</family></_taxon_family_require_std></prefix>
128
                                                            <value>
147 129
                                                                <_join_words>
148 130
                                                                    <1>
149 131
                                                                        <_alt>
......
159 141
                                                                    </1>
160 142
                                                                    <2>$AuthorOfScientificName</2>
161 143
                                                                </_join_words>
162
                                                            </2>
163
                                                        </_join_words>
144
                                                            </value>
145
                                                        </_merge_prefix>
164 146
                                                    </taxonomicname>
165 147
                                                </taxonlabel>
166 148
                                            </taxonlabel_id>
......
182 164
                                                        <taxonlabel>
183 165
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
184 166
                                                            <taxonomicname>
185
                                                                <_join_words>
186
                                                                    <1>
187
                                                                        <_taxon_family_require_std>
188
                                                                            <family>
189
                                                                                <_nullIf>
190
                                                                                    <null>$ScientificNameOriginal</null>
191
                                                                                    <value>$GBIFFamilyOriginal</value>
192
                                                                                </_nullIf>
193
                                                                            </family>
194
                                                                        </_taxon_family_require_std>
195
                                                                    </1>
196
                                                                    <2>
167
                                                                <_merge_prefix>
168
                                                                    <prefix><_taxon_family_require_std><family>$GBIFFamilyOriginal</family></_taxon_family_require_std></prefix>
169
                                                                    <value>
197 170
                                                                        <_alt>
198 171
                                                                            <1>$ScientificNameOriginal</1>
199 172
                                                                            <2>$GBIFGenusOriginal</2>
200 173
                                                                        </_alt>
201
                                                                    </2>
202
                                                                </_join_words>
174
                                                                    </value>
175
                                                                </_merge_prefix>
203 176
                                                            </taxonomicname>
204 177
                                                        </taxonlabel>
205 178
                                                    </matched_label_id>
......
245 218
                                                        </taxonlabel>
246 219
                                                    </parent_id>
247 220
                                                    <taxonomicname>
248
                                                        <_join_words>
249
                                                            <1>
250
                                                                <_taxon_family_require_std>
251
                                                                    <family>
252
                                                                        <_nullIf>
253
                                                                            <null>$ScientificNameOriginal</null>
254
                                                                            <value>$GBIFFamilyOriginal</value>
255
                                                                        </_nullIf>
256
                                                                    </family>
257
                                                                </_taxon_family_require_std>
258
                                                            </1>
259
                                                            <2>
221
                                                        <_merge_prefix>
222
                                                            <prefix><_taxon_family_require_std><family>$GBIFFamilyOriginal</family></_taxon_family_require_std></prefix>
223
                                                            <value>
260 224
                                                                <_alt>
261 225
                                                                    <1>$ScientificNameOriginal</1>
262 226
                                                                    <2>$GBIFGenusOriginal</2>
263 227
                                                                </_alt>
264
                                                            </2>
265
                                                        </_join_words>
228
                                                            </value>
229
                                                        </_merge_prefix>
266 230
                                                    </taxonomicname>
267 231
                                                </taxonlabel>
268 232
                                            </taxonlabel_id>

Also available in: Unified diff