./heading[./@START_INDEX = 0 and ./taxonomicName[./@START_INDEX < 2]] ==> nomenclature
./figureCitation[./@START_INDEX < 2] and $category = 'nomenclature' ==> description
./treatmentCitationGroup[./@START_INDEX < 2] ==> reference_group
./treatmentCitation[./@START_INDEX < 2] ==> reference_group
./keyLead ==> key
((./#first = 'Current' and (./# = 'Status' or ./# = 'status')) or (./#first = 'CURRENT' and ./# = 'STATUS')) and ./taxonomicName ==> nomenclature
./heading[./#first = 'Biology' or ./#first = 'BIOLOGY' or ./#first = 'Ecology' or ./#first = 'ECOLOGY'] ==> biology_ecology
./heading[./#first = 'Diagnosis' or ./#first = 'DIAGNOSIS'] ==> diagnosis
./heading[(./#first = 'Differential' or ./#first = 'DIFFERENTIAL') and (./# = 'Diagnosis' or ./# = 'DIAGNOSIS' or ./# = 'diagnosis')] ==> diagnosis
./heading[./#first = 'Discussion' or ./#first = 'DISCUSSION'] ==> discussion
./heading[./#first = 'Distribution' or ./#first = 'DISTRIBUTION'] ==> distribution
./heading[./#first = 'Etymology' or ./#first = 'ETYMOLOGY'] ==> etymology
./heading[./#first = 'Key' or ./#first = 'KEY' or ./#first = 'Keys' or ./#first = 'KEYS'] ==> key
./heading[(./#first = 'Identification' or ./#first = 'IDENTIFICATION') and (./# = 'Key' or ./# = 'KEY' or ./# = 'key')] ==> key
./heading[./#first = 'References' or ./#first = 'REFERENCES'] ==> reference_group
./heading[./#first = 'Basionym' or ./#first = 'BASIONYM'] ==> reference_group
./heading[./#first = 'Chresonymy' or ./#first = 'CHRESONYMY'] ==> reference_group
./heading[./#first = 'Materials' or ./#first = 'MATERIALS'] ==> materials_examined
./heading[./#first = 'Material' or ./#first = 'MATERIAL'] ==> materials_examined
./heading[(./#first = 'Type' or ./#first = 'TYPE') and (./# = 'Species' or ./# = 'species' or ./# = 'SPECIES' or ./# = 'Genus' or ./# = 'genus' or ./# = 'GENUS')] ==> type_taxon
./heading[./#first = 'Type' or ./#first = 'TYPE'] ==> materials_examined
./heading[./#first = 'Holotype' or ./#first = 'HOLOTYPE'] ==> materials_examined
./heading[./#first = 'Remarks' or ./#first = 'REMARKS'] ==> discussion
./heading[./#first = 'Remark' or ./#first = 'REMARK'] ==> discussion
./heading[./#first = 'Comments' or ./#first = 'COMMENTS'] ==> discussion
./heading[./#first = 'Comment' or ./#first = 'COMMENT'] ==> discussion
./heading[./#first = 'Measurements' or ./#first = 'MEASUREMENTS'] ==> description
./heading[./#first = 'Nests' or ./#first = 'NESTS' or ./#first = 'Hosts' or ./#first = 'HOSTS' or ./#first = 'Host' or ./#first = 'HOST'] ==> biology_ecology
./heading[./#first = 'Observation' and ./# = 'Nests'] ==> biology_ecology
./heading[./#first = 'Derivatio' and (./# = 'nominis' or ./# = 'Nominis')] ==> etymology
./heading[./#first = 'Dimensions' or ./#first = 'DIMENSIONS'] ==> description
./heading[./#first = 'Description' or ./#first = 'DESCRIPTION'] ==> description
./heading[./#first = 'Redescription' or ./#first = 'REDESCRIPTION'] ==> description
./heading[./#first = 'Variation' or ./#first = 'VARIATION'] ==> description
($rule > 6) and ($rule < 36) ==> $category
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and ./collectingCountry[./@START_INDEX < 2]] ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Biology' or ./#first = 'BIOLOGY' or ./#first = 'Ecology' or ./#first = 'ECOLOGY')] ==> biology_ecology
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Diagnosis' or ./#first = 'DIAGNOSIS')] ==> diagnosis
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Differential' or ./#first = 'DIFFERENTIAL') and (./# = 'Diagnosis' or ./# = 'DIAGNOSIS' or ./# = 'diagnosis')] ==> diagnosis
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Discussion' or ./#first = 'DISCUSSION')] ==> discussion
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Distribution' or ./#first = 'DISTRIBUTION')] ==> distribution
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Etymology' or ./#first = 'ETYMOLOGY')] ==> etymology
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Key' or ./#first = 'KEY' or ./#first = 'Keys' or ./#first = 'KEYS')] ==> key
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Identification' or ./#first = 'IDENTIFICATION') and (./# = 'Key' or ./# = 'KEY' or ./# = 'key')] ==> key
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'References' or ./#first = 'REFERENCES')] ==> reference_group
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Basionym' or ./#first = 'BASIONYM')] ==> reference_group
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Materials' or ./#first = 'MATERIALS')] ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Material' or ./#first = 'MATERIAL')] ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Type' or ./#first = 'TYPE') and (./# = 'Species' or ./# = 'species' or ./# = 'SPECIES' or ./# = 'Genus' or ./# = 'genus' or ./# = 'GENUS')] ==> type_taxon
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Type' or ./#first = 'TYPE')] ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Holotype' or ./#first = 'HOLOTYPE')] ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Remarks' or ./#first = 'REMARKS')] ==> discussion
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Remark' or ./#first = 'REMARK')] ==> discussion
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Comments' or ./#first = 'COMMENTS')] ==> discussion
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Comment' or ./#first = 'COMMENT')] ==> discussion
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Measurements' or ./#first = 'MEASUREMENTS')] ==> description
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Nests' or ./#first = 'NESTS' or ./#first = 'Hosts' or ./#first = 'HOSTS' or ./#first = 'Host' or ./#first = 'HOST')] ==> biology_ecology
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Observation' and ./# = 'Nests')] ==> biology_ecology
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Derivatio' and (./# = 'nominis' or ./# = 'Nominis'))] ==> etymology
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Description' or ./#first = 'DESCRIPTION')] ==> description
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Dimensions' or ./#first = 'DIMENSIONS')] ==> description
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Redescription' or ./#first = 'REDESCRIPTION')] ==> description
./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading) and (./#first = 'Variation' or ./#first = 'VARIATION')] ==> description
($rule > 34) and ($rule < 64) ==> $category
./collectingCountry[./@START_INDEX < 2 and matches(./#first, '[A-Z]{3,}')] ==> materials_examined
./materialsCitation[./@START_INDEX < 2] ==> materials_examined
./heading[(./#first = 'Type' or ./#first = 'TYPE') and (./# = 'Species' or ./# = 'species' or ./# = 'SPECIES' or ./# = 'Genus' or ./# = 'genus' or ./# = 'GENUS')] ==> type_taxon
not(./emphasis[./@START_INDEX = 0 and (./@bold or ./@inLineHeading)]) and not(matches(./#first, '[A-Z]{3,}')) and not(./taxonomicName[./@START_INDEX < 2]) and not($category = 'nomenclature') and not($category = 'key') and not($category = 'reference_group') ==> $category
./#first = 'Biology' or ./#first = 'BIOLOGY' or ./#first = 'Ecology' or ./#first = 'ECOLOGY' ==> biology_ecology
./#first = 'Diagnosis' or ./#first = 'DIAGNOSIS' ==> diagnosis
./#first = 'Discussion' or ./#first = 'DISCUSSION' ==> discussion
./#first = 'Distribution' or ./#first = 'DISTRIBUTION' ==> distribution
./#first = 'Etymology' or ./#first = 'ETYMOLOGY' ==> etymology
./#first = 'Key' or ./#first = 'KEY'  or ./#first = 'Keys' or ./#first = 'KEYS' ==> key
./#first = 'References' or ./#first = 'REFERENCES' ==> reference_group
./#first = 'Basionym' or ./#first = 'BASIONYM' ==> reference_group
./#first = 'Materials' or ./#first = 'MATERIALS' ==> materials_examined
./#first = 'Material' or ./#first = 'MATERIAL' ==> materials_examined
./emphasis[./@START_INDEX = 0 and (./# = 'material' or ./# = 'materials' or ./# = 'specimens')] ==> materials_examined
./#first = 'Type' or ./#first = 'TYPE' ==> materials_examined
./#first = 'Holotype' or ./#first = 'HOLOTYPE' ==> materials_examined
./#first = 'Remarks' or ./#first = 'REMARKS' ==> discussion
./#first = 'Remark' or ./#first = 'REMARK' ==> discussion
./#first = 'Comments' or ./#first = 'COMMENTS' ==> discussion
./#first = 'Comment' or ./#first = 'COMMENT' ==> discussion
./#first = 'Measurements' or ./#first = 'MEASUREMENTS' ==> description
./#first = 'Nests' or ./#first = 'NESTS' or ./#first = 'Hosts' or ./#first = 'HOSTS' or ./#first = 'Host' or ./#first = 'HOST' ==> biology_ecology
./#first = 'Observation' and ./# = 'Nests' ==> biology_ecology
./#first = 'Derivatio' and (./# = 'nominis' or ./# = 'Nominis') ==> etymology
./#first = 'Description' or ./#first = 'DESCRIPTION' ==> description
./#first = 'Redescription' or ./#first = 'REDESCRIPTION' ==> description
./#first = 'Variation' or ./#first = 'VARIATION' ==> description
./taxonomicName[./@START_INDEX < 2] and (./taxonomicName/bibRefCitation or count(./bibRefCitation) > 1) ==> reference_group
./taxonomicName[./@START_INDEX < 2 and ./@authorityName and ./@authorityYear and ./@authorityPageNumber] and ($position > 1) and (count(./taxonomicName) = 1) and (./@SIZE <= 50) ==> reference_group
./#first[matches(. , 'Worker|Queen|Soldier|Male|Female')] and ./#[matches(. , '[Dd]escription')] ==> description
./emphasis[./@START_INDEX = 0]/#first[matches(. , 'Worker|Queen|Soldier|Male|Female')] ==> description
./#first[matches(. , 'WORKER|QUEEN|SOLDIER|MALE|FEMALE')] ==> description
./#[matches(., '[Mm]aterial(s)?')]and ./#[matches(., '[Ee]xamined')] ==> materials_examined
./#first = 'Main' and ./# = 'Features' ==> description
./emphasis[./@START_INDEX = 0 and (./# = 'Description' or ./# = 'Redescription' or ./# = 'Measurements')] ==> description
./emphasis[./@START_INDEX = 0 and (./# = 'Diagnosis' or ./# = 'diagnosis' or ./# = 'DIAGNOSIS')] ==> diagnosis
$rule < 101 ==> $category
$position = 1 ==> nomenclature
