Revision 715
Added by Aaron Marcuse-Kubitza almost 13 years ago
inputs/NYBG/test/VegX.xml.ref | ||
---|---|---|
32 | 32 |
<partyID>0</partyID> |
33 | 33 |
</partyWithRole> |
34 | 34 |
<authorCode>9877</authorCode> |
35 |
<voucher>816590
-</voucher>
|
|
35 |
<voucher>816590</voucher> |
|
36 | 36 |
</taxonNameUsageConcept> |
37 | 37 |
<taxonNameUsageConcept id="1"> |
38 | 38 |
<partyWithRole> |
40 | 39 |
<partyID>2</partyID> |
41 | 40 |
</partyWithRole> |
42 | 41 |
<authorCode>545</authorCode> |
43 |
<voucher>220541
-</voucher>
|
|
42 |
<voucher>220541</voucher> |
|
44 | 43 |
</taxonNameUsageConcept> |
45 | 44 |
</taxonNameUsageConcepts> |
46 | 45 |
<parties> |
inputs/NYBG/test/VegBIEN.xml.ref | ||
---|---|---|
62 | 62 |
<definedvalue>with rough brown bark, almost no buttressing, 1 m diam; fallen fruit and leaves</definedvalue> |
63 | 63 |
</definedvalue> |
64 | 64 |
</stemobservation> |
65 |
<authorplantcode>816590
-</authorplantcode>
|
|
65 |
<authorplantcode>816590</authorplantcode> |
|
66 | 66 |
</plantobservation> |
67 | 67 |
</plantobservation_id> |
68 | 68 |
</aggregateoccurrence> |
... | ... | |
79 | 78 |
</party> |
80 | 79 |
</museum_id> |
81 | 80 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
82 |
<sourceaccessioncode>816590
-</sourceaccessioncode>
|
|
81 |
<sourceaccessioncode>816590</sourceaccessioncode> |
|
83 | 82 |
</specimenreplicate> |
84 | 83 |
<taxondetermination> |
85 | 84 |
<role_id> |
... | ... | |
277 | 275 |
</party> |
278 | 276 |
</museum_id> |
279 | 277 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
280 |
<sourceaccessioncode>220541
-</sourceaccessioncode>
|
|
278 |
<sourceaccessioncode>220541</sourceaccessioncode> |
|
281 | 279 |
</specimenreplicate> |
282 | 280 |
<taxondetermination> |
283 | 281 |
<role_id> |
... | ... | |
368 | 365 |
<aggregateoccurrence> |
369 | 366 |
<plantobservation_id> |
370 | 367 |
<plantobservation> |
371 |
<authorplantcode>220541
-</authorplantcode>
|
|
368 |
<authorplantcode>220541</authorplantcode> |
|
372 | 369 |
</plantobservation> |
373 | 370 |
</plantobservation_id> |
374 | 371 |
</aggregateoccurrence> |
bin/map | ||
---|---|---|
13 | 13 |
import opts |
14 | 14 |
import Parser |
15 | 15 |
import sql |
16 |
import strings |
|
16 | 17 |
import util |
17 | 18 |
import xml_dom |
18 | 19 |
import xml_func |
... | ... | |
112 | 113 |
log_start('Getting '+str(in_), debug) |
113 | 114 |
value = get_value(in_, row) |
114 | 115 |
log_done(debug) |
115 |
if value != None: |
|
116 |
xpath.put_obj(root, out, row_id, has_types, value)
|
|
116 |
if value != None: xpath.put_obj(root, out, row_id,
|
|
117 |
has_types, strings.cleanup(value))
|
|
117 | 118 |
process_row(row) |
118 | 119 |
sys.stderr.write('Processed '+str(i+1)+' input rows\n') |
119 | 120 |
|
Also available in: Unified diff
bin/map: Clean up datasource input values