Project

General

Profile

« Previous | Next » 

Revision 3229

mappings/VegX-VegBIEN.stems.csv: Sort the plantobservation.sourceaccessioncode/specimenreplicate.sourceaccessioncode mapping with the other _ifs so the adjacent node merging works properly and it gets created before _ignore removes voucherType

View differences:

inputs/SALVIAS-CSV/test/VegBIEN.organisms.xml.ref
1 1
<?xml version="1.0" ?>
2 2
<VegBIEN>
3 3
    <plantobservation id="0">
4
        <sourceaccessioncode>607771</sourceaccessioncode>
4 5
        <aggregateoccurrence>
5 6
            <taxonoccurrence_id>
6 7
                <taxonoccurrence>
......
8 9
                        <specimenreplicate_id>
9 10
                            <specimenreplicate>
10 11
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
12
                                <sourceaccessioncode>607771</sourceaccessioncode>
11 13
                                <catalognumber_dwc>14598</catalognumber_dwc>
12
                                <sourceaccessioncode>607771</sourceaccessioncode>
13 14
                            </specimenreplicate>
14 15
                        </specimenreplicate_id>
15 16
                    </voucher>
......
112 113
                <tag>8</tag>
113 114
            </stemtag>
114 115
        </stemobservation>
115
        <sourceaccessioncode>607771</sourceaccessioncode>
116 116
    </plantobservation>
117 117
    <plantobservation id="1">
118
        <sourceaccessioncode>607722</sourceaccessioncode>
118 119
        <aggregateoccurrence>
119 120
            <taxonoccurrence_id>
120 121
                <taxonoccurrence>
......
122 123
                        <specimenreplicate_id>
123 124
                            <specimenreplicate>
124 125
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
126
                                <sourceaccessioncode>607722</sourceaccessioncode>
125 127
                                <catalognumber_dwc>14669</catalognumber_dwc>
126
                                <sourceaccessioncode>607722</sourceaccessioncode>
127 128
                            </specimenreplicate>
128 129
                        </specimenreplicate_id>
129 130
                    </voucher>
......
226 227
                <tag>91</tag>
227 228
            </stemtag>
228 229
        </stemobservation>
229
        <sourceaccessioncode>607722</sourceaccessioncode>
230 230
    </plantobservation>
231 231
</VegBIEN>
inputs/SALVIAS-CSV/maps/VegBIEN.organisms.csv
1 1
SALVIAS-CSV,VegBIEN:/plantobservation,Comments
2
OBSERVATION_ID,"/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later.; Quotes sort it with other _ifs"
2 3
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
3 4
voucher_string,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
4 5
census_date,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_date/year,
......
31 32
x_position,/stemobservation/xposition,"Brad: Correct for VegBank. I'm not so sure for VegX. Let's ask Nick about this. These are important, fundamental values of many tree plots, and should be accommodated within VegX."
32 33
y_position,/stemobservation/yposition,Brad: See comment above for x_position
33 34
det_type,/{.}/_ignore/voucherType,"Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
34
OBSERVATION_ID,"/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
35 35
basal_diam,,** No join mapping for /diameterBaseDistance[baseDistance/value=0]/diameter ** 
36 36
collector_code,,Brad: OMIT
37 37
comments,,Brad: OMIT
inputs/CTFS/maps/VegBIEN.organisms.csv
1 1
CTFS[VegX]:/*s/individualOrganismObservation,VegBIEN:/plantobservation,Comments
2
:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",Quotes sort it with other _ifs
2 3
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3 4
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4 5
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
......
84 85
/relativePlotPosition/relativeX,/stemobservation/xposition,
85 86
/relativePlotPosition/relativeY,/stemobservation/yposition,
86 87
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
87
:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",
88 88
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/*/relatedPlot[plotRelationship=Quadrat]/relatedPlotID,,** No input mapping for /*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/*/relatedPlot[plotRelationship=Quadrat]/relatedPlotID ** 
inputs/SALVIAS/test/VegBIEN.organisms.xml.ref
1 1
<?xml version="1.0" ?>
2 2
<VegBIEN>
3 3
    <plantobservation id="0">
4
        <sourceaccessioncode>1</sourceaccessioncode>
4 5
        <specimenreplicate>
5 6
            <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
7
            <sourceaccessioncode>1</sourceaccessioncode>
6 8
            <catalognumber_dwc>931</catalognumber_dwc>
7
            <sourceaccessioncode>1</sourceaccessioncode>
8 9
        </specimenreplicate>
9 10
        <aggregateoccurrence>
10 11
            <taxonoccurrence_id>
......
102 103
            </definedvalue>
103 104
        </aggregateoccurrence>
104 105
        <authorplantcode>1</authorplantcode>
105
        <sourceaccessioncode>1</sourceaccessioncode>
106 106
    </plantobservation>
107 107
    <plantobservation id="1">
108
        <sourceaccessioncode>2</sourceaccessioncode>
108 109
        <specimenreplicate>
109 110
            <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
111
            <sourceaccessioncode>2</sourceaccessioncode>
110 112
            <catalognumber_dwc>933</catalognumber_dwc>
111
            <sourceaccessioncode>2</sourceaccessioncode>
112 113
        </specimenreplicate>
113 114
        <aggregateoccurrence>
114 115
            <taxonoccurrence_id>
......
206 207
            </definedvalue>
207 208
        </aggregateoccurrence>
208 209
        <authorplantcode>2</authorplantcode>
209
        <sourceaccessioncode>2</sourceaccessioncode>
210 210
    </plantobservation>
211 211
</VegBIEN>
inputs/SALVIAS/maps/VegBIEN.organisms.csv
1 1
SALVIAS,VegBIEN:/plantobservation,Comments
2
PlotObsID,"/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later.; Quotes sort it with other _ifs"
2 3
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
3 4
SourceVoucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
4 5
census_date,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date",
......
29 30
x_position,/stemobservation/xposition,"Brad: Correct for VegBank. I'm not so sure for VegX. Let's ask Nick about this. These are important, fundamental values of many tree plots, and should be accommodated within VegX."
30 31
y_position,/stemobservation/yposition,Brad: See comment above for x_position
31 32
DetType,/{.}/_ignore/voucherType,"Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
32
PlotObsID,"/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
33 33
GenAuth,,** No input mapping for GenAuth ** 
34 34
IsMorpho,,** No input mapping for IsMorpho ** 
35 35
Notes,,** No join mapping for /*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/note/text ** 
mappings/VegX-VegBIEN.organisms.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation",VegBIEN:/plantobservation,Comments
2
:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",Quotes sort it with other _ifs
2 3
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3 4
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4 5
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
......
84 85
/relativePlotPosition/relativeX,/stemobservation/xposition,
85 86
/relativePlotPosition/relativeY,/stemobservation/yposition,
86 87
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
87
:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",
mappings/for_review/VegX-VegBIEN.organisms.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation",VegBIEN:/plantobservation,Comments
2
/simpleUserdefined[name=sourceAccessionCode]/value,"/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//sourceaccessioncode}",Quotes sort it with other _ifs
2 3
//taxonNameUsageConcept/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//catalognumber_dwc",
3 4
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//collectiondate",
4 5
//party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
......
84 85
//relativePlotPosition/relativeX,//stemobservation/xposition,
85 86
//relativePlotPosition/relativeY,//stemobservation/yposition,
86 87
//*s/taxonDetermination[role=collector]/groupType,/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
87
/simpleUserdefined[name=sourceAccessionCode]/value,"/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//sourceaccessioncode}",
mappings/for_review/VegX-VegBIEN.stems.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation[relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID]",VegBIEN:/stemobservation,Comments
2
//individualOrganismObservation/simpleUserdefined[name=sourceAccessionCode]/value,"/*_id/plantobservation/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//sourceaccessioncode}",Quotes sort it with other _ifs
2 3
//taxonNameUsageConcept/voucher,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//catalognumber_dwc",
3 4
//individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//collectiondate",
4 5
//party/organizationName,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
......
85 86
//relativePlotPosition/relativeX,//stemobservation/xposition,
86 87
//relativePlotPosition/relativeY,//stemobservation/yposition,
87 88
//*s/taxonDetermination[role=collector]/groupType,/*_id/plantobservation/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
88
//individualOrganismObservation/simpleUserdefined[name=sourceAccessionCode]/value,"/*_id/plantobservation/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//sourceaccessioncode}",
89 89
/diameterBaseDistance[value=0]/diameter,/basaldiameter,
90 90
/simpleUserdefined[name=canopyForm]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]/definedvalue",
91 91
/simpleUserdefined[name=canopyPosition]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]/definedvalue",
mappings/VegX-VegBIEN.stems.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation[relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID]",VegBIEN:/stemobservation,Comments
2
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/*_id/plantobservation/""""/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",Quotes sort it with other _ifs
2 3
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3 4
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4 5
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
......
85 86
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/relativePlotPosition/relativeX,/*_id/plantobservation/stemobservation/xposition,
86 87
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/relativePlotPosition/relativeY,/*_id/plantobservation/stemobservation/yposition,
87 88
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/*_id/plantobservation/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
88
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation:[*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceAccessionCode]/value,"/*_id/plantobservation/{sourceaccessioncode,_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode}",
89 89
/diameterBaseDistance[baseDistance/value=0]/diameter,/basaldiameter,
90 90
/simpleUserdefined[name=canopyForm]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]:[@fkey=tablerecord_id]/definedvalue",
91 91
/simpleUserdefined[name=canopyPosition]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]:[@fkey=tablerecord_id]/definedvalue",

Also available in: Unified diff