Project

General

Profile

« Previous | Next » 

Revision 4503

bin/map: map_table(): Resolve all mappings and prefixes after applying maps.simplify()

View differences:

inputs/SpeciesLink/Specimen/test.xml.ref
9 9
                        <1>
10 10
                            <_alt>
11 11
                                <0>$dwc_dwcore_InstitutionCode</0>
12
                                <1>$conceptual_darwin_2003_1_0_InstitutionCode</1>
13
                                <2>$dwc_terms_institutionCode</2>
12
                                <1>$dwc_terms_institutionCode</1>
13
                                <2>$conceptual_darwin_2003_1_0_InstitutionCode</2>
14
                                <3>$dwc_dwcore_InstitutionCode</3>
15
                                <4>$dwc_terms_institutionCode</4>
16
                                <5>$conceptual_darwin_2003_1_0_InstitutionCode</5>
14 17
                            </_alt>
15 18
                        </1>
16 19
                        <2>
......
18 21
                                <1>
19 22
                                    <_alt>
20 23
                                        <0>$dwc_dwcore_CollectionCode</0>
21
                                        <1>$conceptual_darwin_2003_1_0_CollectionCode</1>
22
                                        <2>$dwc_terms_collectionCode</2>
24
                                        <1>$dwc_terms_collectionCode</1>
25
                                        <2>$conceptual_darwin_2003_1_0_CollectionCode</2>
26
                                        <3>$dwc_dwcore_CollectionCode</3>
27
                                        <4>$dwc_terms_collectionCode</4>
28
                                        <5>$conceptual_darwin_2003_1_0_CollectionCode</5>
23 29
                                    </_alt>
24 30
                                </1>
25 31
                                <2>$dwc_terms_collectionID</2>
......
28 34
                        <3>
29 35
                            <_alt>
30 36
                                <0>$dwc_dwcore_CatalogNumber</0>
31
                                <1>$conceptual_darwin_2003_1_0_CatalogNumber</1>
32
                                <2>$dwc_terms_catalogNumber</2>
37
                                <1>$dwc_terms_catalogNumber</1>
38
                                <2>$conceptual_darwin_2003_1_0_CatalogNumber</2>
39
                                <3>$dwc_dwcore_CatalogNumber</3>
40
                                <4>$dwc_terms_catalogNumber</4>
41
                                <5>$conceptual_darwin_2003_1_0_CatalogNumber</5>
33 42
                            </_alt>
34 43
                        </3>
35 44
                    </_join>
......
51 60
                                        <0>$conceptual_darwin_2003_1_0_MaximumElevation</0>
52 61
                                        <1>$dwc_dwcore_MaximumElevationInMeters</1>
53 62
                                        <2>$dwc_terms_maximumElevationInMeters</2>
63
                                        <3>$dwc_dwcore_MaximumElevationInMeters</3>
64
                                        <4>$dwc_terms_maximumElevationInMeters</4>
54 65
                                    </_alt>
55 66
                                </value>
56 67
                            </_replace>
......
72 83
                                                <0>$conceptual_darwin_2003_1_0_MinimumElevation</0>
73 84
                                                <1>$dwc_dwcore_MinimumElevationInMeters</1>
74 85
                                                <2>$dwc_terms_minimumElevationInMeters</2>
86
                                                <3>$dwc_dwcore_MinimumElevationInMeters</3>
87
                                                <4>$dwc_terms_minimumElevationInMeters</4>
75 88
                                            </_alt>
76 89
                                        </value>
77 90
                                    </_replace>
......
99 112
                                                <0>$conceptual_darwin_2003_1_0_MinimumElevation</0>
100 113
                                                <1>$dwc_dwcore_MinimumElevationInMeters</1>
101 114
                                                <2>$dwc_terms_minimumElevationInMeters</2>
115
                                                <3>$dwc_dwcore_MinimumElevationInMeters</3>
116
                                                <4>$dwc_terms_minimumElevationInMeters</4>
102 117
                                            </_alt>
103 118
                                        </value>
104 119
                                    </_replace>
......
122 137
                                                <0>$conceptual_darwin_2003_1_0_MaximumElevation</0>
123 138
                                                <1>$dwc_dwcore_MaximumElevationInMeters</1>
124 139
                                                <2>$dwc_terms_maximumElevationInMeters</2>
140
                                                <3>$dwc_dwcore_MaximumElevationInMeters</3>
141
                                                <4>$dwc_terms_maximumElevationInMeters</4>
125 142
                                            </_alt>
126 143
                                        </value>
127 144
                                    </_replace>
......
136 153
                                                        <0>$conceptual_darwin_2003_1_0_MinimumElevation</0>
137 154
                                                        <1>$dwc_dwcore_MinimumElevationInMeters</1>
138 155
                                                        <2>$dwc_terms_minimumElevationInMeters</2>
156
                                                        <3>$dwc_dwcore_MinimumElevationInMeters</3>
157
                                                        <4>$dwc_terms_minimumElevationInMeters</4>
139 158
                                                    </_alt>
140 159
                                                </value>
141 160
                                            </_replace>
......
170 189
                                <_alt>
171 190
                                    <0>$dwc_geospatial_DecimalLatitude</0>
172 191
                                    <1>$dwc_terms_decimalLatitude</1>
192
                                    <2>$dwc_geospatial_DecimalLatitude</2>
193
                                    <3>$dwc_terms_decimalLatitude</3>
173 194
                                </_alt>
174 195
                            </value>
175 196
                        </_nullIf>
......
183 204
                                    <0>$conceptual_darwin_2003_1_0_Latitude</0>
184 205
                                    <1>$dwc_geospatial_VerbatimLatitude</1>
185 206
                                    <2>$dwc_terms_verbatimLatitude</2>
207
                                    <3>$dwc_geospatial_VerbatimLatitude</3>
208
                                    <4>$dwc_terms_verbatimLatitude</4>
186 209
                                </_alt>
187 210
                            </value>
188 211
                        </_nullIf>
......
199 222
                                <_alt>
200 223
                                    <0>$dwc_geospatial_DecimalLongitude</0>
201 224
                                    <1>$dwc_terms_decimalLongitude</1>
225
                                    <2>$dwc_geospatial_DecimalLongitude</2>
226
                                    <3>$dwc_terms_decimalLongitude</3>
202 227
                                </_alt>
203 228
                            </value>
204 229
                        </_nullIf>
......
212 237
                                    <0>$conceptual_darwin_2003_1_0_Longitude</0>
213 238
                                    <1>$dwc_geospatial_VerbatimLongitude</1>
214 239
                                    <2>$dwc_terms_verbatimLongitude</2>
240
                                    <3>$dwc_geospatial_VerbatimLongitude</3>
241
                                    <4>$dwc_terms_verbatimLongitude</4>
215 242
                                </_alt>
216 243
                            </value>
217 244
                        </_nullIf>
......
228 255
                            <placename>
229 256
                                <_alt>
230 257
                                    <0>$dwc_dwcore_County</0>
231
                                    <1>$conceptual_darwin_2003_1_0_County</1>
232
                                    <2>$dwc_terms_county</2>
258
                                    <1>$dwc_terms_county</1>
259
                                    <2>$conceptual_darwin_2003_1_0_County</2>
260
                                    <3>$dwc_dwcore_County</3>
261
                                    <4>$dwc_terms_county</4>
262
                                    <5>$conceptual_darwin_2003_1_0_County</5>
233 263
                                </_alt>
234 264
                            </placename>
235 265
                            <parent_id>
......
238 268
                                    <placename>
239 269
                                        <_alt>
240 270
                                            <0>$dwc_dwcore_StateProvince</0>
241
                                            <1>$conceptual_darwin_2003_1_0_StateProvince</1>
242
                                            <2>$dwc_terms_stateProvince</2>
271
                                            <1>$dwc_terms_stateProvince</1>
272
                                            <2>$conceptual_darwin_2003_1_0_StateProvince</2>
273
                                            <3>$dwc_dwcore_StateProvince</3>
274
                                            <4>$dwc_terms_stateProvince</4>
275
                                            <5>$conceptual_darwin_2003_1_0_StateProvince</5>
243 276
                                        </_alt>
244 277
                                    </placename>
245 278
                                    <parent_id>
......
248 281
                                            <placename>
249 282
                                                <_alt>
250 283
                                                    <0>$dwc_dwcore_Country</0>
251
                                                    <1>$conceptual_darwin_2003_1_0_Country</1>
252
                                                    <2>$dwc_terms_country</2>
284
                                                    <1>$dwc_terms_country</1>
285
                                                    <2>$conceptual_darwin_2003_1_0_Country</2>
286
                                                    <3>$dwc_dwcore_Country</3>
287
                                                    <4>$dwc_terms_country</4>
288
                                                    <5>$conceptual_darwin_2003_1_0_Country</5>
253 289
                                                </_alt>
254 290
                                            </placename>
255 291
                                            <parent_id>
......
258 294
                                                    <placename>
259 295
                                                        <_alt>
260 296
                                                            <0>$dwc_dwcore_Continent</0>
261
                                                            <1>$conceptual_darwin_2003_1_0_ContinentOcean</1>
262
                                                            <2>$dwc_terms_continent</2>
297
                                                            <1>$dwc_terms_continent</1>
298
                                                            <2>$conceptual_darwin_2003_1_0_ContinentOcean</2>
299
                                                            <3>$dwc_dwcore_Continent</3>
300
                                                            <4>$dwc_terms_continent</4>
263 301
                                                        </_alt>
264 302
                                                    </placename>
265 303
                                                </namedplace>
......
374 412
                    <count>
375 413
                        <_alt>
376 414
                            <0>$dwc_curatorial_IndividualCount</0>
377
                            <1>$conceptual_darwin_2003_1_0_IndividualCount</1>
378
                            <2>$dwc_terms_individualCount</2>
415
                            <1>$dwc_terms_individualCount</1>
416
                            <2>$conceptual_darwin_2003_1_0_IndividualCount</2>
417
                            <3>$dwc_curatorial_IndividualCount</3>
418
                            <4>$dwc_terms_individualCount</4>
419
                            <5>$conceptual_darwin_2003_1_0_IndividualCount</5>
379 420
                        </_alt>
380 421
                    </count>
381 422
                    <notes>$conceptual_darwin_2003_1_0_Notes</notes>
......
392 433
                                <2>
393 434
                                    <_alt>
394 435
                                        <0>$dwc_curatorial_FieldNumber</0>
395
                                        <1>$conceptual_darwin_2003_1_0_FieldNumber</1>
396
                                        <2>$dwc_curatorial_FieldNumber</2>
397
                                        <3>$conceptual_darwin_2003_1_0_FieldNumber</3>
436
                                        <1>$dwc_terms_fieldNumber</1>
437
                                        <2>$conceptual_darwin_2003_1_0_FieldNumber</2>
438
                                        <3>$dwc_curatorial_FieldNumber</3>
398 439
                                        <4>$dwc_terms_fieldNumber</4>
399
                                        <5>$dwc_terms_fieldNumber</5>
440
                                        <5>$conceptual_darwin_2003_1_0_FieldNumber</5>
441
                                        <6>$dwc_curatorial_FieldNumber</6>
442
                                        <7>$dwc_terms_fieldNumber</7>
443
                                        <8>$conceptual_darwin_2003_1_0_FieldNumber</8>
444
                                        <9>$dwc_curatorial_FieldNumber</9>
445
                                        <10>$dwc_terms_fieldNumber</10>
446
                                        <11>$conceptual_darwin_2003_1_0_FieldNumber</11>
400 447
                                    </_alt>
401 448
                                </2>
402 449
                            </_alt>
......
411 458
                            <definedvalue>
412 459
                                <_alt>
413 460
                                    <0>$dwc_dwcore_Sex</0>
414
                                    <1>$conceptual_darwin_2003_1_0_Sex</1>
415
                                    <2>$dwc_terms_sex</2>
461
                                    <1>$dwc_terms_sex</1>
462
                                    <2>$conceptual_darwin_2003_1_0_Sex</2>
463
                                    <3>$dwc_dwcore_Sex</3>
464
                                    <4>$dwc_terms_sex</4>
465
                                    <5>$conceptual_darwin_2003_1_0_Sex</5>
416 466
                                </_alt>
417 467
                            </definedvalue>
418 468
                        </definedvalue>
......
420 470
                            <catalognumber_dwc>
421 471
                                <_alt>
422 472
                                    <0>$dwc_dwcore_CatalogNumber</0>
423
                                    <1>$conceptual_darwin_2003_1_0_CatalogNumber</1>
424
                                    <2>$dwc_terms_catalogNumber</2>
473
                                    <1>$dwc_terms_catalogNumber</1>
474
                                    <2>$conceptual_darwin_2003_1_0_CatalogNumber</2>
475
                                    <3>$dwc_dwcore_CatalogNumber</3>
476
                                    <4>$dwc_terms_catalogNumber</4>
477
                                    <5>$conceptual_darwin_2003_1_0_CatalogNumber</5>
425 478
                                </_alt>
426 479
                            </catalognumber_dwc>
427 480
                            <collectioncode_dwc>
......
429 482
                                    <1>
430 483
                                        <_alt>
431 484
                                            <0>$dwc_dwcore_CollectionCode</0>
432
                                            <1>$conceptual_darwin_2003_1_0_CollectionCode</1>
433
                                            <2>$dwc_terms_collectionCode</2>
485
                                            <1>$dwc_terms_collectionCode</1>
486
                                            <2>$conceptual_darwin_2003_1_0_CollectionCode</2>
487
                                            <3>$dwc_dwcore_CollectionCode</3>
488
                                            <4>$dwc_terms_collectionCode</4>
489
                                            <5>$conceptual_darwin_2003_1_0_CollectionCode</5>
434 490
                                        </_alt>
435 491
                                    </1>
436 492
                                    <2>$dwc_terms_collectionID</2>
......
441 497
                                    <organizationname>
442 498
                                        <_alt>
443 499
                                            <0>$dwc_dwcore_InstitutionCode</0>
444
                                            <1>$conceptual_darwin_2003_1_0_InstitutionCode</1>
445
                                            <2>$dwc_terms_institutionCode</2>
500
                                            <1>$dwc_terms_institutionCode</1>
501
                                            <2>$conceptual_darwin_2003_1_0_InstitutionCode</2>
502
                                            <3>$dwc_dwcore_InstitutionCode</3>
503
                                            <4>$dwc_terms_institutionCode</4>
504
                                            <5>$conceptual_darwin_2003_1_0_InstitutionCode</5>
446 505
                                        </_alt>
447 506
                                    </organizationname>
448 507
                                </party>
......
465 524
                                <2>
466 525
                                    <_alt>
467 526
                                        <0>$dwc_curatorial_FieldNumber</0>
468
                                        <1>$conceptual_darwin_2003_1_0_FieldNumber</1>
469
                                        <2>$dwc_curatorial_FieldNumber</2>
470
                                        <3>$conceptual_darwin_2003_1_0_FieldNumber</3>
527
                                        <1>$dwc_terms_fieldNumber</1>
528
                                        <2>$conceptual_darwin_2003_1_0_FieldNumber</2>
529
                                        <3>$dwc_curatorial_FieldNumber</3>
471 530
                                        <4>$dwc_terms_fieldNumber</4>
472
                                        <5>$dwc_terms_fieldNumber</5>
531
                                        <5>$conceptual_darwin_2003_1_0_FieldNumber</5>
532
                                        <6>$dwc_curatorial_FieldNumber</6>
533
                                        <7>$dwc_terms_fieldNumber</7>
534
                                        <8>$conceptual_darwin_2003_1_0_FieldNumber</8>
535
                                        <9>$dwc_curatorial_FieldNumber</9>
536
                                        <10>$dwc_terms_fieldNumber</10>
537
                                        <11>$conceptual_darwin_2003_1_0_FieldNumber</11>
473 538
                                    </_alt>
474 539
                                </2>
475 540
                            </_alt>
......
477 542
                        <2>
478 543
                            <_alt>
479 544
                                <0>$dwc_dwcore_ScientificName</0>
480
                                <1>$conceptual_darwin_2003_1_0_ScientificName</1>
481
                                <2>$dwc_terms_scientificName</2>
545
                                <1>$dwc_terms_scientificName</1>
546
                                <2>$conceptual_darwin_2003_1_0_ScientificName</2>
547
                                <3>$dwc_dwcore_ScientificName</3>
548
                                <4>$dwc_terms_scientificName</4>
549
                                <5>$conceptual_darwin_2003_1_0_ScientificName</5>
482 550
                            </_alt>
483 551
                        </2>
484 552
                    </_alt>
......
491 559
                                    <first>
492 560
                                        <_alt>
493 561
                                            <0>$dwc_curatorial_IdentifiedBy</0>
494
                                            <1>$conceptual_darwin_2003_1_0_IdentifiedBy</1>
495
                                            <2>$dwc_terms_identifiedBy</2>
562
                                            <1>$dwc_terms_identifiedBy</1>
563
                                            <2>$conceptual_darwin_2003_1_0_IdentifiedBy</2>
564
                                            <3>$dwc_curatorial_IdentifiedBy</3>
565
                                            <4>$dwc_terms_identifiedBy</4>
566
                                            <5>$conceptual_darwin_2003_1_0_IdentifiedBy</5>
496 567
                                        </_alt>
497 568
                                    </first>
498 569
                                </_namePart>
......
502 573
                                    <middle>
503 574
                                        <_alt>
504 575
                                            <0>$dwc_curatorial_IdentifiedBy</0>
505
                                            <1>$conceptual_darwin_2003_1_0_IdentifiedBy</1>
506
                                            <2>$dwc_terms_identifiedBy</2>
576
                                            <1>$dwc_terms_identifiedBy</1>
577
                                            <2>$conceptual_darwin_2003_1_0_IdentifiedBy</2>
578
                                            <3>$dwc_curatorial_IdentifiedBy</3>
579
                                            <4>$dwc_terms_identifiedBy</4>
580
                                            <5>$conceptual_darwin_2003_1_0_IdentifiedBy</5>
507 581
                                        </_alt>
508 582
                                    </middle>
509 583
                                </_namePart>
......
513 587
                                    <last>
514 588
                                        <_alt>
515 589
                                            <0>$dwc_curatorial_IdentifiedBy</0>
516
                                            <1>$conceptual_darwin_2003_1_0_IdentifiedBy</1>
517
                                            <2>$dwc_terms_identifiedBy</2>
590
                                            <1>$dwc_terms_identifiedBy</1>
591
                                            <2>$conceptual_darwin_2003_1_0_IdentifiedBy</2>
592
                                            <3>$dwc_curatorial_IdentifiedBy</3>
593
                                            <4>$dwc_terms_identifiedBy</4>
594
                                            <5>$conceptual_darwin_2003_1_0_IdentifiedBy</5>
518 595
                                        </_alt>
519 596
                                    </last>
520 597
                                </_namePart>
......
532 609
                                            <plantname>
533 610
                                                <_alt>
534 611
                                                    <0>$dwc_dwcore_ScientificName</0>
535
                                                    <1>$conceptual_darwin_2003_1_0_ScientificName</1>
536
                                                    <2>$dwc_terms_scientificName</2>
612
                                                    <1>$dwc_terms_scientificName</1>
613
                                                    <2>$conceptual_darwin_2003_1_0_ScientificName</2>
614
                                                    <3>$dwc_dwcore_ScientificName</3>
615
                                                    <4>$dwc_terms_scientificName</4>
616
                                                    <5>$conceptual_darwin_2003_1_0_ScientificName</5>
537 617
                                                </_alt>
538 618
                                            </plantname>
539 619
                                            <parent_id>
......
552 632
                                                            <plantname>
553 633
                                                                <_alt>
554 634
                                                                    <0>$dwc_dwcore_InfraspecificEpithet</0>
555
                                                                    <1>$conceptual_darwin_2003_1_0_Subspecies</1>
556
                                                                    <2>$dwc_terms_infraspecificEpithet</2>
635
                                                                    <1>$dwc_terms_infraspecificEpithet</1>
636
                                                                    <2>$conceptual_darwin_2003_1_0_Subspecies</2>
637
                                                                    <3>$dwc_dwcore_InfraspecificEpithet</3>
638
                                                                    <4>$dwc_terms_infraspecificEpithet</4>
557 639
                                                                </_alt>
558 640
                                                            </plantname>
559 641
                                                            <parent_id>
......
564 646
                                                                            <0>$conceptual_darwin_2003_1_0_Species</0>
565 647
                                                                            <1>$dwc_dwcore_SpecificEpithet</1>
566 648
                                                                            <2>$dwc_terms_specificEpithet</2>
649
                                                                            <3>$dwc_dwcore_SpecificEpithet</3>
650
                                                                            <4>$dwc_terms_specificEpithet</4>
567 651
                                                                        </_alt>
568 652
                                                                    </plantname>
569 653
                                                                    <parent_id>
......
572 656
                                                                            <plantname>
573 657
                                                                                <_alt>
574 658
                                                                                    <0>$dwc_dwcore_Genus</0>
575
                                                                                    <1>$conceptual_darwin_2003_1_0_Genus</1>
576
                                                                                    <2>$dwc_terms_genus</2>
659
                                                                                    <1>$dwc_terms_genus</1>
660
                                                                                    <2>$conceptual_darwin_2003_1_0_Genus</2>
661
                                                                                    <3>$dwc_dwcore_Genus</3>
662
                                                                                    <4>$dwc_terms_genus</4>
663
                                                                                    <5>$conceptual_darwin_2003_1_0_Genus</5>
577 664
                                                                                </_alt>
578 665
                                                                            </plantname>
579 666
                                                                            <parent_id>
......
582 669
                                                                                    <plantname>
583 670
                                                                                        <_alt>
584 671
                                                                                            <0>$dwc_dwcore_Family</0>
585
                                                                                            <1>$conceptual_darwin_2003_1_0_Family</1>
586
                                                                                            <2>$dwc_terms_family</2>
672
                                                                                            <1>$dwc_terms_family</1>
673
                                                                                            <2>$conceptual_darwin_2003_1_0_Family</2>
674
                                                                                            <3>$dwc_dwcore_Family</3>
675
                                                                                            <4>$dwc_terms_family</4>
676
                                                                                            <5>$conceptual_darwin_2003_1_0_Family</5>
587 677
                                                                                        </_alt>
588 678
                                                                                    </plantname>
589 679
                                                                                    <parent_id>
......
592 682
                                                                                            <plantname>
593 683
                                                                                                <_alt>
594 684
                                                                                                    <0>$dwc_dwcore_Order</0>
595
                                                                                                    <1>$conceptual_darwin_2003_1_0_Order</1>
596
                                                                                                    <2>$dwc_terms_order</2>
685
                                                                                                    <1>$dwc_terms_order</1>
686
                                                                                                    <2>$conceptual_darwin_2003_1_0_Order</2>
687
                                                                                                    <3>$dwc_dwcore_Order</3>
688
                                                                                                    <4>$dwc_terms_order</4>
689
                                                                                                    <5>$conceptual_darwin_2003_1_0_Order</5>
597 690
                                                                                                </_alt>
598 691
                                                                                            </plantname>
599 692
                                                                                            <parent_id>
......
602 695
                                                                                                    <plantname>
603 696
                                                                                                        <_alt>
604 697
                                                                                                            <0>$dwc_dwcore_Class</0>
605
                                                                                                            <1>$conceptual_darwin_2003_1_0_Class</1>
606
                                                                                                            <2>$dwc_terms_class</2>
698
                                                                                                            <1>$dwc_terms_class</1>
699
                                                                                                            <2>$conceptual_darwin_2003_1_0_Class</2>
700
                                                                                                            <3>$dwc_dwcore_Class</3>
701
                                                                                                            <4>$dwc_terms_class</4>
702
                                                                                                            <5>$conceptual_darwin_2003_1_0_Class</5>
607 703
                                                                                                        </_alt>
608 704
                                                                                                    </plantname>
609 705
                                                                                                    <parent_id>
......
612 708
                                                                                                            <plantname>
613 709
                                                                                                                <_alt>
614 710
                                                                                                                    <0>$dwc_dwcore_Phylum</0>
615
                                                                                                                    <1>$conceptual_darwin_2003_1_0_Phylum</1>
616
                                                                                                                    <2>$dwc_terms_phylum</2>
711
                                                                                                                    <1>$dwc_terms_phylum</1>
712
                                                                                                                    <2>$conceptual_darwin_2003_1_0_Phylum</2>
713
                                                                                                                    <3>$dwc_dwcore_Phylum</3>
714
                                                                                                                    <4>$dwc_terms_phylum</4>
715
                                                                                                                    <5>$conceptual_darwin_2003_1_0_Phylum</5>
617 716
                                                                                                                </_alt>
618 717
                                                                                                            </plantname>
619 718
                                                                                                            <parent_id>
......
622 721
                                                                                                                    <plantname>
623 722
                                                                                                                        <_alt>
624 723
                                                                                                                            <0>$dwc_dwcore_Kingdom</0>
625
                                                                                                                            <1>$conceptual_darwin_2003_1_0_Kingdom</1>
626
                                                                                                                            <2>$dwc_terms_kingdom</2>
724
                                                                                                                            <1>$dwc_terms_kingdom</1>
725
                                                                                                                            <2>$conceptual_darwin_2003_1_0_Kingdom</2>
726
                                                                                                                            <3>$dwc_dwcore_Kingdom</3>
727
                                                                                                                            <4>$dwc_terms_kingdom</4>
728
                                                                                                                            <5>$conceptual_darwin_2003_1_0_Kingdom</5>
627 729
                                                                                                                        </_alt>
628 730
                                                                                                                    </plantname>
629 731
                                                                                                                </plantname>
......
713 815
                                            <0>$conceptual_darwin_2003_1_0_MaximumDepth</0>
714 816
                                            <1>$dwc_dwcore_MaximumDepthInMeters</1>
715 817
                                            <2>$dwc_terms_maximumDepthInMeters</2>
818
                                            <3>$dwc_dwcore_MaximumDepthInMeters</3>
819
                                            <4>$dwc_terms_maximumDepthInMeters</4>
716 820
                                        </_alt>
717 821
                                    </value>
718 822
                                </_replace>
......
732 836
                                            <0>$conceptual_darwin_2003_1_0_MinimumDepth</0>
733 837
                                            <1>$dwc_dwcore_MinimumDepthInMeters</1>
734 838
                                            <2>$dwc_terms_minimumDepthInMeters</2>
839
                                            <3>$dwc_dwcore_MinimumDepthInMeters</3>
840
                                            <4>$dwc_terms_minimumDepthInMeters</4>
735 841
                                        </_alt>
736 842
                                    </value>
737 843
                                </_replace>
......
744 850
        <locationnarrative>
745 851
            <_alt>
746 852
                <0>$dwc_dwcore_Locality</0>
747
                <1>$conceptual_darwin_2003_1_0_Locality</1>
748
                <2>$dwc_terms_locality</2>
853
                <1>$dwc_terms_locality</1>
854
                <2>$conceptual_darwin_2003_1_0_Locality</2>
855
                <3>$dwc_dwcore_Locality</3>
856
                <4>$dwc_terms_locality</4>
857
                <5>$conceptual_darwin_2003_1_0_Locality</5>
749 858
            </_alt>
750 859
        </locationnarrative>
751 860
    </location>
bin/map
299 299
        def map_table(col_names, rows, **kw_args):
300 300
            col_names_ct = len(col_names)
301 301
            col_idxs = util.list_flip(col_names)
302
            col_names_simp = map(maps.simplify, col_names)
303
            col_names_recover = dict(zip(col_names_simp, col_names))
304
            col_idxs_simp = util.list_flip(col_names_simp)
305
            prefixes_simp = map(maps.simplify, prefixes)
302 306
            
303 307
            # Resolve prefixes
304 308
            mappings_orig = mappings[:] # save a copy
305 309
            mappings[:] = [] # empty existing elements
306 310
            for in_, out in mappings_orig:
307 311
                if metadata_value(in_) == None:
308
                    try: cols = get_with_prefix(col_idxs, prefixes, in_)
312
                    try:
313
                        cols = get_with_prefix(col_idxs_simp, prefixes_simp,
314
                            maps.simplify(in_))
309 315
                    except KeyError: pass
310
                    else: mappings[len(mappings):] = [[db_xml.ColRef(*col), out]
311
                        for col in cols] # can't use += because that uses =
316
                    else:
317
                        cols = [(col_names_recover[n], i) for n, i in cols]
318
                        mappings[len(mappings):] = [[db_xml.ColRef(*col), out]
319
                            for col in cols] # can't use += because that uses =
312 320
            
313 321
            def get_value(in_, row): return row.list[in_.idx]
314 322
            def wrap_row(row):

Also available in: Unified diff