Project

General

Profile

« Previous | Next » 

Revision 1984

Added by Matt Jones over 20 years ago

Added the ability to describe taxonomicCoverage to the registry. This
allows an arbitrary number of species or other taxa to be listed, and the
editing form can dynamically grow through a simple javascript approach
(also used in Methods). Need to test thoroughly, and need to test on
other browsers -- works on Mozilla and Firebird so far.

View differences:

lib/style/common/templates/entryForm.tmpl
12 12
        var parent = addParaButton.parentNode;
13 13
        parent.insertBefore(newParaContainer, addParaButton);
14 14
    }
15

  
16
    function addTaxon() {
17
        var taxaCountField = document.getElementById("taxaCount");
18
        var taxaCount = taxaCountField.getAttribute("value");
19
        taxaCount++;
20
        taxaCountField.setAttribute("value", taxaCount);
21
        var taxonRow = createTaxonRow(taxaCount);
22
        var taxonRowMarker = document.getElementById("addtaxarow");
23
        var parent = taxonRowMarker.parentNode;
24
        parent.insertBefore(taxonRow, taxonRowMarker);
25
    }
26

  
27
    function createTaxonRow(taxaCount) {
28
        var rankField=createTextField("taxonRankName" + taxaCount, "25");
29
        var rankCell = document.createElement("td");
30
        rankCell.appendChild(rankField);
31
        var taxonField=createTextField("taxonRankValue" + taxaCount, "25");
32
        var taxonCell = document.createElement("td");
33
        taxonCell.appendChild(taxonField);
34
        var taxonRow = document.createElement("tr");
35
        taxonRow.appendChild(rankCell);
36
        taxonRow.appendChild(taxonCell);
37

  
38
        return taxonRow;
39
    }
40

  
41
    function createTextField(name, size) {
42
        var newField=document.createElement("input");
43
        newField.setAttribute("type", "text"); 
44
        newField.setAttribute("name", name); 
45
        newField.setAttribute("size", size); 
46

  
47
        return newField;
48
    }
15 49
  </script>
16 50

  
17 51
[% IF cfg == 'nrs' %]
......
1021 1055
      </td>
1022 1056
    </tr>
1023 1057
  </table>
1024
  <br>
1025
  <p align="left"><font size="4" color="0000ff"><b><font size="-1">
1026
  <a
1027
   href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#SpatialCoverageOfData"
1028
   target="guide">SPATIAL COVERAGE OF DATA</a>
1029
	</font></b></font> 
1058

  
1059
  <p align="left">
1060
  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#SpatialCoverageOfData" target="guide">SPATIAL COVERAGE OF DATA</a>
1061
  </p>
1030 1062
  <table cellspacing="0" border="0" cellpadding="9" width="760"
1031 1063
bgcolor="#c6d6e7">
1032 1064
    <tr>
1033 1065
    <td valign="top" colspan="4">
1034 1066
    <span class="required">*</span><span class="label">Geographic Description</span><br>
1035
    <textarea rows="3" columns="80" name="geogdesc">[% geogdesc %]</textarea>
1067
    <textarea rows="3" cols="80" name="geogdesc">[% geogdesc %]</textarea>
1036 1068
    </td>
1037 1069
    </tr>
1038 1070
    <tr> 
1039 1071
      <td valign="TOP" colspan="4"> 
1040
        <p><font size="-1"><b>Coordinates (in Degrees, Minutes and Seconds; at 
1041
          least 1 lat./long. pair is required):</b></font></p>
1072
        <p class="label">Coordinates (in Degrees, Minutes and Seconds; at 
1073
          least 1 lat./long. pair is required):</p>
1042 1074
      </td>
1043 1075
    </tr>
1044 1076
    <tr> 
1045 1077
      <td valign="TOP" colspan="4"> 
1046
        <p><font size="-1"><b>Enter the first lat./long. pair only to indicate 
1047
          a point location. Enter both coordinate pairs to indicate a bounding 
1048
          box. In case of a bounding box, the first coordinate pair is the northwest 
1049
          corner and the second coordinate pair is the southeast corner of the 
1050
          bounding box.</b></font></p>
1078
        <p>Enter the first lat./long. pair only to indicate 
1079
          a point location. Enter both coordinate pairs to indicate a bounding
1080
          box. In case of a bounding box, the first coordinate pair is the
1081
          northwest corner and the second coordinate pair is the southeast
1082
          corner of the bounding box.</p>
1051 1083
      </td>
1052 1084
    </tr>
1053 1085
[% IF showSiteList == 'true' %]
1054
    <tr> 
1055
      <td valign="TOP" colspan="4" class="tablepanel"><font size="-1" color="#ff0000"> 
1056
        <input
1057
type="CHECKBOX" name="useSiteCoord" [%useSiteCoord%]>
1058
        Use [% lsite %] coordinates. (This indicates that the data were collected 
1059
        at the [% lsite %]. If you check this box, you don't need to fill in the lat./long. 
1060
        fields below).</font> </td>
1086
    <tr>
1087
      <td valign="TOP" colspan="4" class="tablepanel">
1088
        <input class="required"
1089
        type="CHECKBOX" name="useSiteCoord" [%useSiteCoord%]>
1090
        Use [% lsite %] coordinates. (This indicates that the data were
1091
        collected at the [% lsite %]. If you check this box, you don't need
1092
        to fill in the lat./long. fields below).
1093
        </td>
1061 1094
    </tr>
1062 1095
[% END %]
1063 1096
    <tr> 
1064 1097
      <td width="18%" valign="TOP"> 
1065
        <p><font size="-1"><b><font color="#ff0000">*</font>Latitude</b></font></p>
1098
        <span class="required">*</span><span class="label">Latitude</span>
1066 1099
      </td>
1067 1100
      <td width="20%" valign="TOP"> 
1068
        <p><font size="-1">&nbsp;North/South</font></p>
1101
        &nbsp;North/South
1069 1102
      </td>
1070 1103
      <td width="20%" valign="TOP"> 
1071
        <p><font size="-1"><b><font color="#ff0000">*</font>Longitude</b></font></p>
1104
        <span class="required">*</span><span class="label">Longitude</span>
1072 1105
      </td>
1073 1106
      <td width="42%" valign="TOP"> 
1074
        <p><font size="-1">&nbsp;West/East</font></p>
1107
        &nbsp;West/East
1075 1108
      </td>
1076 1109
    </tr>
1077 1110
    <tr> 
1078 1111
      <td width="20%" valign="TOP"> 
1079
        <p><font size="-1"> 
1080 1112
          <input type="TEXT" name="latDeg1" value="[%latDeg1%]" size="3" maxlength="3">
1081 1113
          <input type="TEXT" name="latMin1" value="[%latMin1%]" size="2" maxlength="2">
1082 1114
          <input type="TEXT" name="latSec1" value="[%latSec1%]" size="2" maxlength="2">
1083
          </font></p>
1084 1115
      </td>
1085 1116
      <td width="20%" valign="TOP"> 
1086
        <p> <font size="-1">
1087 1117
          <select name="hemisphLat1">
1088 1118
	    [% IF form == 're_entry' %]
1089 1119
	    	<option selected>[%hemisphLat1%]</option>
......
1091 1121
            <option>N</option>
1092 1122
            <option>S</option>
1093 1123
          </select>
1094
          </font></p>
1095 1124
      </td>
1096 1125
      <td width="20%" valign="TOP"> 
1097
        <p><font size="-1"> 
1098 1126
          <input type="TEXT" name="longDeg1" value="[%longDeg1%]" size="3" maxlength="3">
1099 1127
          <input type="TEXT" name="longMin1" value="[%longMin1%]" size="2" maxlength="2">
1100 1128
          <input type="TEXT" name="longSec1" value="[%longSec1%]" size="2" maxlength="2">
1101
          </font></p>
1102 1129
      </td>
1103 1130
      <td width="40%" valign="TOP"> 
1104
        <p> <font size="-1">
1105 1131
          <select name="hemisphLong1">
1106 1132
	    [% IF form == 're_entry' %]
1107 1133
	    	<option selected>[%hemisphLong1%]</option>
......
1109 1135
            <option>W</option>
1110 1136
            <option>E</option>
1111 1137
          </select>
1112
          </font></p>
1113 1138
      </td>
1114 1139
    </tr>
1115 1140
    <tr> 
1116 1141
      <td valign="TOP" colspan="4"> 
1117
        <p><font size="-1"><b>The second lat./long. pair, if provided, indicates 
1118
          the southeast corner of a bounding box.</b></font></p>
1142
        The second lat./long. pair, if provided, indicates 
1143
        the southeast corner of a bounding box.
1119 1144
      </td>
1120 1145
    </tr>
1121 1146
    <tr> 
1122 1147
      <td width="18%" valign="TOP"> 
1123
        <p><font size="-1"><b>Latitude</b></font></p>
1148
        Latitude
1124 1149
      </td>
1125 1150
      <td width="20%" valign="TOP"> 
1126
        <p><font size="-1">&nbsp;North/South</font></p>
1151
        &nbsp;North/South
1127 1152
      </td>
1128 1153
      <td width="20%" valign="TOP"> 
1129
        <p><font size="-1"><b>Longitude</b></font></p>
1154
        Longitude
1130 1155
      </td>
1131 1156
      <td width="42%" valign="TOP"> 
1132
        <p><font size="-1">West/East</font></p>
1157
        West/East
1133 1158
      </td>
1134 1159
    </tr>
1135 1160
    <tr> 
1136 1161
      <td width="20%" valign="TOP"> 
1137
        <p><font size="-1"> 
1138 1162
          <input type="TEXT" name="latDeg2" value="[%latDeg2%]" size="3" maxlength="3">
1139 1163
          <input type="TEXT" name="latMin2" value="[%latMin2%]" size="2" maxlength="2">
1140 1164
          <input type="TEXT" name="latSec2" value="[%latSec2%]" size="2" maxlength="2">
1141
          </font></p>
1142 1165
      </td>
1143 1166
      <td width="20%" valign="TOP"> 
1144
        <p> <font size="-1">
1145 1167
          <select name="hemisphLat2">
1146 1168
	    [% IF form == 're_entry' %]	
1147 1169
	    	<option selected>[%hemisphLat2%]</option>
......
1149 1171
	    <option>N</option>
1150 1172
            <option>S</option>
1151 1173
          </select>
1152
          </font></p>
1153 1174
      </td>
1154 1175
      <td width="20%" valign="TOP"> 
1155
        <p><font size="-1"> 
1156 1176
          <input type="TEXT" name="longDeg2" value="[%longDeg2%]" size="3" maxlength="3">
1157 1177
          <input type="TEXT" name="longMin2" value="[%longMin2%]" size="2" maxlength="2">
1158 1178
          <input type="TEXT" name="longSec2" value="[%longSec2%]" size="2" maxlength="2">
1159
          </font></p>
1160 1179
      </td>
1161 1180
      <td width="40%" valign="TOP"> 
1162
        <p> <font size="-1">
1163 1181
          <select name="hemisphLong2">
1164 1182
	    [% IF form == 're_entry' %]
1165 1183
	    	<option selected>[%hemisphLong2%]</option>
......
1167 1185
            <option>W</option>
1168 1186
            <option>E</option>
1169 1187
          </select>
1170
          </font></p>
1171 1188
      </td>
1172 1189
    </tr>
1173 1190
  </table>
1174 1191

  
1175 1192
  [% IF cfg == 'nceas' %]
1193
  <p align="left">
1194
  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#TaxonomicCoverage" target="guide">TAXONOMIC COVERAGE OF DATA</a>
1195
   </p>
1196
  <table cellspacing="0" border="0" cellpadding="9" width="760" 
1197
    bgcolor="#c6d6e7">
1198
    <tbody>
1199
    <tr> 
1200
        <td colspan="2">
1201
        <p class="label">List the taxa associated with this set of data.</p>
1202
        <p>The Taxon Rank should indicate the level in the taxonomic
1203
        hierarchy (e.g., Phylum or Species) and the Taxonomic Name should 
1204
        be the scientific name for the organism at that level 
1205
        (e.g., <i>Ursus arctos</i>).</p>
1206
        [% numTaxa = 1 %]
1207
        [% IF taxaCount > 0 %]
1208
            [% numTaxa = taxaCount %]
1209
        [% END %]
1210
        <input type="hidden" name="taxaCount" value="[%numTaxa%]" 
1211
            id="taxaCount">
1212
        </td>
1213
    </tr>
1214

  
1215
    <tr>
1216
    <td>
1217
        <table border="0">
1218
        <tbody>
1219
        <tr> 
1220
            <td><span class="label">Taxon Rank</span></td>
1221
            <td><span class="label">Taxon Name</span></td>
1222
        </tr>
1223
        [% cnt = 1 %]
1224
        [% WHILE cnt <= numTaxa %]
1225
            <tr> 
1226
            <td>
1227
            [% SET trn = "taxonRankName${cnt}" %]
1228
            <input name="taxonRankName[%cnt%]" value="[% $trn %]" size="25">
1229
            </td>
1230
            <td>
1231
            [% SET trv = "taxonRankValue${cnt}" %]
1232
            <input name="taxonRankValue[%cnt%]" value="[% $trv %]" size="25">
1233
            </td>
1234
            </tr>
1235
            [% cnt = cnt + 1 %]
1236
         [% END %]
1237
        <tr id="addtaxarow"> 
1238
            <td>
1239
                <input type="button" value="Add taxon" id="addtaxabutton1"
1240
                    onClick="addTaxon()">
1241
            </td>
1242
        </tr>
1243
        </tbody>
1244
        </table>
1245

  
1246
     </td>
1247
     </tr>
1248
     </tbody>
1249
   </table>
1250
  [% END %]
1251

  
1252
  [% IF cfg == 'nceas' %]
1253
  <p align="left">
1176 1254
  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#Methods" target="guide">METHODS</a>
1255
   </p>
1177 1256
  <table cellspacing="0" border="0" cellpadding="9" width="760" bgcolor="#c6d6e7">
1178 1257
    <tbody>
1179 1258
    <tr> 
......
1207 1286
   </table>
1208 1287
  [% END %]
1209 1288

  
1210
  <p><b><font size="-1" color="#0000ff">
1211
  <a
1212
   href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetContactAddress"
1213
   target="guide">DATA SET CONTACT ADDRESS</a>
1214
	</font></b></p>
1289
  <p align="left">
1290
  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetContactAddress" target="guide">DATA SET CONTACT ADDRESS</a>
1291
  </p>
1215 1292
  <table border="0" cellspacing="0" cellpadding="9" width="760" bgcolor="#c6d6e7">
1216 1293
    <tr> 
1217 1294
      <td valign="TOP" colspan="3"><font size="-1" color="#ff0000"> 
......
1330 1407
      </td>
1331 1408
    </tr>
1332 1409
  </table>
1333
  <br>
1334
  <p align="left"><font size="4" color="0000ff"><b><font size="-1">
1335
  <a
1336
   href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DistributionIinformation"
1337
   target="guide">DISTRIBUTION INFORMATION</a>
1338
	</font></b></font> 
1410

  
1411
  <p align="left">
1412
  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DistributionIinformation" target="guide">DISTRIBUTION INFORMATION</a>
1413
  </p>
1339 1414
  <table cellspacing="0" border="0" cellpadding="9" width="760"
1340 1415
bgcolor="#c6d6e7">
1341 1416
    <tr> 
......
1368 1443
          </font></p>
1369 1444
      </td>
1370 1445
    </tr>
1371
<!--
1372
  <table cellspacing="0" border="0" cellpadding="9" width="760"
1373
bgcolor="#c6d6e7">
1374
-->
1375 1446
    <tr> 
1376 1447
      <td width="50%" valign="TOP"> 
1377 1448
        <p> <font size="-1"><b><font color="#ff0000">*</font>Use Constraints:</b></font> 
......
1395 1466
          </font></p>
1396 1467
      </td>
1397 1468
    </tr>
1398
<!--
1399
  </table>
1400
-->
1401 1469
    <tr> 
1402 1470
      <td> 
1403 1471
        <p align="left"><font size="-1"> 
......
1415 1483
      </td>
1416 1484
    </tr>
1417 1485
  </table>
1418
  <br>
1486

  
1419 1487
  <div align="center"> 
1420 1488
    <table width="760" border="0" cellpadding="9" align="left" bgcolor="#C6d6e7" cellspacing="0">
1421 1489
      <tr> 
lib/style/common/templates/confirmData.tmpl
484 484
    </tr>
485 485
  </table>
486 486

  
487
    [% numTaxa = 0 %]
488
    [% IF taxaCount > 0 %]
489
        [% numTaxa = taxaCount %]
490
    [% END %]
491
    <hr>
492
    <a name="Taxonomic Coverage"></a>
493
    [% cnt = 1 %]
494
    [% WHILE cnt <= numTaxa %]
495
        [% SET trn = "taxonRankName${cnt}" %]
496
        [% SET trv = "taxonRankValue${cnt}" %]
497
        <p><b><font size="-1">Taxon:</font></b>  [% $trn %]: [% $trv %]</p>
498
        [% cnt = cnt + 1 %]
499
     [% END %]
487 500

  
488 501
[% IF cfg == 'nceas' %]
489 502
    <hr>
490 503
    <a name="Methods"></a>
491
    <p><b><font size="-1">Mthod Title:</font></b>  [%methodTitle%]</p>
504
    <p><b><font size="-1">Method Title:</font></b>  [%methodTitle%]</p>
492 505
    [% FOREACH para = methodPara %]
493 506
        <p><b><font size="-1">Paragraph:</font></b>  [%para%] </p>
494 507
    [% END %]
......
696 709
  <input type="hidden" name="longMin2" value="[%longMin2%]">
697 710
  <input type="hidden" name="longSec2" value="[%longSec2%]">
698 711
  <input type="hidden" name="hemisphLong2" value="[%hemisphLong2%]">
712
  <input type="hidden" name="taxaCount" value="[%taxaCount%]">
713
  [% cnt = 1 %]
714
  [% WHILE cnt <= numTaxa %]
715
      [% SET trn = "taxonRankName${cnt}" %]
716
      [% SET trv = "taxonRankValue${cnt}" %]
717
      <input type="hidden" name="[% trn %]" value="[% $trn %]">
718
      <input type="hidden" name="[% trv %]" value="[% $trv %]">
719
      [% cnt = cnt + 1 %]
720
  [% END %]
721

  
699 722
  [% IF cfg == 'nceas' %]
700 723
      <input type="hidden" name="methodTitle" value="[%methodTitle%]">
701 724
      [% FOREACH para = methodPara %]
src/perl/register-dataset.cgi
1127 1127
    $doc .= "</boundingCoordinates>\n";
1128 1128
    $doc .= "</geographicCoverage>\n";
1129 1129

  
1130
    # Taxonomic coverage information
1131
    # my $foundFirstTaxKeyword = 0;
1132
    # foreach my $tmp (param()) {
1133
    #    if ($tmp =~ /keyword/) {
1134
    #        my $tmp1 = $tmp;
1135
    #        $tmp1 =~ s/keyword//; # get the index of the parameter 0, ..., 10
1136
    #        if ( $tmp1 =~ /[0-9]/ ){
1137
    #            # don't generate xml for empty keyword fields
1138
    #            if (hasContent(param($tmp))) {
1139
    #                if (hasContent(param("kwType" . $tmp1)) &&
1140
    #                   (param("kwType" . $tmp1) eq "taxonomic") ) {
1141
    #                    # Opening tags before first taxonomic. keyword.
1142
    #                    if ($foundFirstTaxKeyword == 0) {
1143
    #                        $foundFirstTaxKeyword = 1;
1144
    #                        $doc .= "<taxonomicCoverage>\n";
1145
    #                    }
1146
    #                    $doc .= "<keywtax>\n";
1147
    #                    $doc .= "<taxonkt>".param("kwTh".$tmp1)."</taxonkt>\n";
1148
    #                    $doc .= "<taxonkey>".param("keyword".$tmp1).
1149
    #                            "</taxonkey>\n";
1150
    #                    $doc .= "</keywtax>\n";
1151
    #                }
1152
    #            }
1153
    #        }
1154
    #    }
1155
    # }
1156
    # Closing tag for taxonomic coverage, if there was a tax. keyword
1157
    # if ($foundFirstTaxKeyword == 1) {
1158
    #    $doc .= "<taxoncl></taxoncl>\n";
1159
    #    $doc .= "</taxonomicCoverage>\n";
1160
    # }
1130
    # Write out the taxonomic coverage fields
1131
    my $foundFirstTaxon = 0;
1132
    foreach my $trn (param()) {
1133
        if ($trn =~ /taxonRankName/) {
1134
            my $taxIndex = $trn;
1135
            $taxIndex =~ s/taxonRankName//; # get the index of the parameter 0, ..., 10
1136
            my $trv = "taxonRankValue".$taxIndex;
1137
            if ( $taxIndex =~ /[0-9]/ ){
1138
                if (hasContent(param($trn)) && hasContent(param($trv))) {
1139
                    if (! $foundFirstTaxon) {
1140
                        $doc .= "<taxonomicCoverage>\n";
1141
                        $foundFirstTaxon = 1;
1142
                    }
1143
                    $doc .= "<taxonomicClassification>\n";
1144
                    $doc .= "  <taxonRankName>".param($trn)."</taxonRankName>\n";
1145
                    $doc .= "  <taxonRankValue>".param($trv)."</taxonRankValue>\n";
1146
                    $doc .= "</taxonomicClassification>\n";
1147
                }
1148
            }
1149
        }
1150
    }
1151
    if ($foundFirstTaxon) {
1152
        $doc .= "</taxonomicCoverage>\n";
1153
    }
1161 1154

  
1162 1155
    $doc .= "</coverage>\n";
1163 1156

  
......
1714 1707
        errMoreThanOne("coverage");
1715 1708
    } else {
1716 1709
        foreach $node ($results->get_nodelist) {
1717
            dontOccur($node, "./temporalCoverage/rangeOfDates/beginDate/time|./temporalCoverage/rangeOfDates/beginDate/alternativeTimeScale|./temporalCoverage/rangeOfDates/endDate/time|./temporalCoverage/rangeOfDates/endDate/alternativeTimeScale|./taxonomicCoverage|./geographicCoverage/datasetGPolygon|./geographicCoverage/boundingCoordinates/boundingAltitudes", "temporalCoverage/rangeOfDates/beginDate/time, /temporalCoverage/rangeOfDates/beginDate/alternativeTimeScale, /temporalCoverage/rangeOfDates/endDate/time, /temporalCoverage/rangeOfDates/endDate/alternativeTimeScale, /taxonomicCoverage, /geographicCoverage/datasetGPolygon, /geographicCoverage/boundingCoordinates/boundingAltitudes");
1710
            dontOccur($node, "./temporalCoverage/rangeOfDates/beginDate/time|./temporalCoverage/rangeOfDates/beginDate/alternativeTimeScale|./temporalCoverage/rangeOfDates/endDate/time|./temporalCoverage/rangeOfDates/endDate/alternativeTimeScale|./taxonomicCoverage/taxonomicSystem|./taxonomicCoverage/generalTaxonomicCoverage|./taxonomicCoverage/taxonomicClassification/commonName|./taxonomicCoverage/taxonomicClassification/taxonomicClassification|./geographicCoverage/datasetGPolygon|./geographicCoverage/boundingCoordinates/boundingAltitudes", "temporalCoverage/rangeOfDates/beginDate/time, /temporalCoverage/rangeOfDates/beginDate/alternativeTimeScale, /temporalCoverage/rangeOfDates/endDate/time, /temporalCoverage/rangeOfDates/endDate/alternativeTimeScale, /taxonomicCoverage/taxonomicSystem, /taxonomicCoverage/generalTaxonomicCoverage, /taxonomicCoverage/taxonomicClassification/commonName, /taxonomicCoverage/taxonomicClassification/taxonomicClassification, /geographicCoverage/datasetGPolygon, /geographicCoverage/boundingCoordinates/boundingAltitudes");
1718 1711

  
1719 1712
            $tempResult = $node->findnodes('./temporalCoverage');
1720 1713
            if ($tempResult->size > 1) {
......
1816 1809
                    eval($$templateVars{'longSec2'} = int($coord));
1817 1810
                }
1818 1811
            }
1812

  
1813
            $tempResult = $node->findnodes('./taxonomicCoverage/taxonomicClassification');
1814
            my $taxonIndex = 0;
1815
            foreach $tempNode ($tempResult->get_nodelist) {
1816
                $taxonIndex++;
1817
                my $taxonRankName = findValue($tempNode, "taxonRankName");
1818
                my $taxonRankValue = findValue($tempNode, "taxonRankValue");
1819
                $$templateVars{"taxonRankName".$taxonIndex} = $taxonRankName;
1820
                $$templateVars{"taxonRankValue".$taxonIndex} = $taxonRankValue;
1821
            }
1822
            $$templateVars{'taxaCount'} = $taxonIndex;
1819 1823
        }
1820 1824
    }
1821 1825
    dontOccur($doc, "./purpose", "purpose");
......
2274 2278
    $$templateVars{'longMin2'} = $FORM::longMin2;
2275 2279
    $$templateVars{'longSec2'} = $FORM::longSec2;
2276 2280
    $$templateVars{'hemisphLong2'} = $FORM::hemisphLong2;
2281

  
2282
    $$templateVars{'taxaCount'} = $FORM::taxaCount;
2283
    foreach my $trn (param()) {
2284
        if ($trn =~ /taxonRankName/) {
2285
            my $taxIndex = $trn;
2286
            $taxIndex =~ s/taxonRankName//; # get the index of the parameter 0, ..., 10
2287
            my $trv = "taxonRankValue".$taxIndex;
2288
            if ( $taxIndex =~ /[0-9]/ ){
2289
                if (hasContent(param($trn)) && hasContent(param($trv))) {
2290
                    debug("Registry processing taxon: $trn = ".param($trn)." $trv = ".param($trv));
2291
                    $$templateVars{$trn} = param($trn);
2292
                    $$templateVars{$trv} = param($trv);
2293
                }
2294
            }
2295
        }
2296
    }
2297

  
2277 2298
    $$templateVars{'methodTitle'} = $FORM::methodTitle;
2278 2299
    $$templateVars{'methodPara'} = \@FORM::methodPara;
2279 2300
    $$templateVars{'docid'} = $FORM::docid;

Also available in: Unified diff