Project

General

Profile

« Previous | Next » 

Revision 4788

review: Don't remove XML functions that are unit conversions

View differences:

bin/review
33 33
        r'', xpath)
34 34
    if n > 0: truncated = True
35 35
    
36
    # Remove XML functions
37
    xpath = re.sub(r'/_\w+/\w+', r'', xpath)
36
    # Remove XML functions other than unit conversions
37
    xpath = re.sub(r'/_(?!\w+_to_)\w+/\w+', r'', xpath)
38 38
    
39 39
    # Remove backward (child-to-parent) pointer's target ID attr
40 40
    xpath = re.sub(r'\[[\w*]+\]|(?<=\[)[\w*]+,', r'', xpath)
mappings/for_review/VegCore-VegBIEN.csv
14 14
plotName,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
15 15
locationID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
16 16
plotArea_m2,//location/area_m2,
17
plotArea_ha,//location/area_m2,
17
plotArea_ha,//location/area_m2/_ha_to_m2/value,
18 18
subplot,//location/authorlocationcode,
19 19
verbatimElevation,//location/elevation_m,
20 20
maximumElevationInMeters,//location/elevation_m,
......
72 72
monthCollected,//aggregateoccurrence/collectiondate,
73 73
yearCollected,//aggregateoccurrence/collectiondate,
74 74
individualCount,//aggregateoccurrence/count,
75
coverPercent,//aggregateoccurrence/cover_fraction,
75
coverPercent,//aggregateoccurrence/cover_fraction/_pct_to_frac/value,
76 76
censusNumber,"//aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]/definedvalue",
77 77
intercept_m,//aggregateoccurrence/linecover_m,
78
intercept_cm,//aggregateoccurrence/linecover_m,
78
intercept_cm,//aggregateoccurrence/linecover_m/_cm_to_m/value,
79 79
fieldNotes,//aggregateoccurrence/notes,
80 80
recordNumber,//plantobservation/collectionnumber,
81 81
sex,"//plantobservation/definedvalue[*_id/userdefined[tablename=plantobservation,userdefinedname=sex]]/definedvalue","Brad: OMIT. Apparently not used by this institution and of uncertain applicability to plants. With other collections, *sometimes* used for phenological information (if specimen in flower, in fruit, sterile, etc.). If so, this is important information we should keep. Bob, Nick, anywhere for phenological information in VB and VX?; Aaron: Keeping it because it's useful for some collections"

Also available in: Unified diff