Index: lib/style/common/templates/confirmData.tmpl
===================================================================
--- lib/style/common/templates/confirmData.tmpl	(revision 9632)
+++ lib/style/common/templates/confirmData.tmpl	(revision 9633)
@@ -408,7 +408,7 @@
 <p><span class="sectionnames">DISTRIBUTION INFORMATION</span> 
 
 <a name=Site-specificCode></a>
-<p><span class="label">Data Set Identifier:</span> [%identifier%]
+<p><span class="label">Data Set Identifier:</span> [%identifierValue1%]
 </p>
 
 <p><span class="label">Data Medium:</span>       [%dataMedium%]&nbsp;&nbsp;&nbsp;&nbsp;<span class="label">Other Data Medium</span>: [%dataMediumOther%]
@@ -437,7 +437,8 @@
           <input type="hidden" name="wg" value="[%group%]">
       [% END %]
   [% END %]
-  <input type="hidden" name="identifier" value="[%identifier%]">
+  <input type="hidden" name="identifier" value="[%identifierValue1%]">
+  <input type="hidden" name="identifierValue1" value="[%identifierValue1%]">
   <input type="hidden" name="title" value="[%title%]">
   <input type="hidden" name="origNamefirst0" value="[%origNamefirst0%]">
   <input type="hidden" name="origNamelast0" value="[%origNamelast0%]">
Index: lib/style/common/templates/entryForm.tmpl
===================================================================
--- lib/style/common/templates/entryForm.tmpl	(revision 9632)
+++ lib/style/common/templates/entryForm.tmpl	(revision 9633)
@@ -981,7 +981,7 @@
 
    <table class="tables" cellpadding="5" cellspacing="0" id="distTable">  
   <tr class="sectbody"><td class="rightCol"><span class="label">Data Set Identifier</span></td>
-  <td colspan="5"><input type="TEXT" name="identifier" value="[%identifier%]" class="longwidth"></td></tr>
+  <td colspan="5"><input type="TEXT" name="identifier" value="[%identifierValue1%]" class="longwidth"></td></tr>
   <tr class="sectbody"><td valign="top" align="right"><span class="label">Note:</span></td>
      <td colspan="4" align="left"><span class="regtext">
      If available, please enter a name or number that uniquely identifies and<br>
Index: lib/style/common/templates/genericResponse.tmpl
===================================================================
--- lib/style/common/templates/genericResponse.tmpl	(revision 9632)
+++ lib/style/common/templates/genericResponse.tmpl	(revision 9633)
@@ -72,7 +72,8 @@
                                 <input type="hidden" name="wg" value="[%group%]">
                             [% END %]
                         [% END %]
-                        <input type="hidden" name="identifier" value="[%identifier%]">
+                        <input type="hidden" name="identifier" value="[%identifierValue1%]">
+  						<input type="hidden" name="identifierValue1" value="[%identifierValue1%]">
                         <input type="hidden" name="title" value="[%title%]">
                         <input type="hidden" name="origNamefirst0" value="[%origNamefirst0%]">
                         <input type="hidden" name="origNamelast0" value="[%origNamelast0%]">
Index: lib/style/common/templates/metacatui/confirmData.tmpl
===================================================================
--- lib/style/common/templates/metacatui/confirmData.tmpl	(revision 9632)
+++ lib/style/common/templates/metacatui/confirmData.tmpl	(revision 9633)
@@ -399,7 +399,19 @@
 <h4>Distribution Information</h4> 
 
 <a name="Site-specificCode"></a>
-<p><span class="text-info">Data Set Identifier:</span> [%identifier%]
+<p><span class="text-info">Data Set Identifiers:</span> 
+
+[% numIdentifier = 0 %]
+[% IF identifierCount > 0 %]
+    [% numIdentifier = identifierCount %]
+[% END %]
+[% cnt = 1 %]
+[% WHILE cnt <= numIdentifier %]
+    [% SET id = "identifierValue${cnt}" %]
+    <p><span class="text-info">Identifier:</span> [% $id %]</p>
+    [% cnt = cnt + 1 %]
+ [% END %]
+
 </p>
 
 <p><span class="text-info">Data Medium:</span>       [%dataMedium%]    <span class="text-info">Other Data Medium</span>: [%dataMediumOther%]
@@ -458,7 +470,16 @@
           <input type="hidden" name="wg" value="[%group%]" />
       [% END %]
   [% END %]
-  <input type="hidden" name="identifier" value="[%identifier%]" /> 
+
+  [% cnt = 1 %]
+  [% WHILE cnt <= numIdentifier %]
+      [% SET id = "identifierValue${cnt}" %]
+      <input type="hidden" name="[% id %]" value="[% $id %]" />
+      <input type="hidden" name="identifier" value="[% $id %]" />
+      [% cnt = cnt + 1 %]
+  [% END %]  
+  <input type="hidden" name="identifierCount" value="[% identifierCount %]" />
+
   <input type="hidden" name="title" value="[%title%]" />
   <input type="hidden" name="origNamefirst0" value="[%origNamefirst0%]" />
   <input type="hidden" name="origNamelast0" value="[%origNamelast0%]" />
Index: lib/style/common/templates/metacatui/entryForm.js
===================================================================
--- lib/style/common/templates/metacatui/entryForm.js	(revision 9632)
+++ lib/style/common/templates/metacatui/entryForm.js	(revision 9633)
@@ -655,6 +655,118 @@
     }
 }
 
+
+//BEGIN BRL ALTERNATE IDENTIFIER
+function addIdentifier() {   
+    var identifier   = document.getElementById("identifier");
+
+    if (identifier.value !="") {
+        var identifierCount = incrementCount("identifierCount");
+        var row = createIdentifierRow(identifierCount, identifier.value);
+        var identifierRowMarker = document.getElementById("addidentifierrow");
+        var parent = identifierRowMarker.parentNode;
+        
+        var identifierHR = document.getElementById("identifierHRRow");
+        if (identifierHR == null) {
+            var identifierHRRow = createHRRow();
+            identifierHRRow.setAttribute("id", "identifierHRRow");
+            parent.insertBefore(identifierHRRow, identifierRowMarker);
+        }
+        
+        parent.insertBefore(row, identifierRowMarker);
+
+        identifier.value = "";
+    } else {
+        alert("Enter complete alternate identifier information");
+    }
+}
+
+function createIdentifierRow(identifierCount, identifier){    
+    var TR = document.createElement("tr");
+    TR.className='sectbody';
+
+    var labelTD = createTD("5","left", "pointer");
+    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
+        labelTD.attachEvent("onclick",new Function("identifierEditRow(event, 0, \"" + identifier  + "\")"));
+    } else {
+        labelTD.setAttribute("onClick","identifierEditRow(event, 0, \"" + identifier  + "\")");
+    }
+
+    var text = "Identifier: " + identifier;
+    var label = document.createTextNode(text);
+
+    labelTD.appendChild(label);
+    labelTD.appendChild(createHiddenInput("identifier", identifier));
+    
+    var imgTD = createTD("","right");
+    imgTD.className = 'rightCol';
+
+    imgTD.appendChild(createIconLink("icon-arrow-up",
+                                      "Move Up", "moveUpRow(event)",
+                                      "pointer"));
+    imgTD.appendChild(document.createTextNode(" "));
+    imgTD.appendChild(createIconLink("icon-arrow-down",
+                                      "Move Down", "moveDownRow(event, 'addidentifierrow')",
+                                      "pointer"));
+    imgTD.appendChild(document.createTextNode(" "));
+    imgTD.appendChild(createIconLink("icon-remove-sign",
+                                      "Delete", "delRow(event)",
+                                      "pointer"));
+
+    TR.appendChild(imgTD);
+    TR.appendChild(labelTD);
+    
+    return TR;
+}
+
+function identifierEditRow(evt, num, identifier) {
+    evt = (evt) ? evt : ((window.event) ? window.event : null);
+    if (evt) {
+        // equalize W3C/IE models to get event target reference
+        var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+        if (elem && elem.nodeName == "TD") {
+            try {
+                var table = elem.parentNode;
+                if (num == 0) {
+                    table.removeChild(elem);
+                    var TD = createTD("5","left", "pointer");
+                    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
+                        TD.attachEvent("onclick",new Function("identifierEditRow(event, 1, \"" + identifier  + "\")"));
+                    } else {
+                        TD.setAttribute("onClick","taxonEditRow(event, 1, \"" + identifier  + "\")");
+                    }
+          
+                    
+                    TD.appendChild(document.createTextNode(" Identifier: "));
+                    TD.appendChild(createTextField("identifier", 15, identifier));
+                    table.appendChild(TD);
+                } else {
+                    var child = elem.childNodes;
+                    taxonName = child.item(1).value;
+                    table.removeChild(elem);
+
+                    var TD = createTD("5","left", "pointer");
+                    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
+                        TD.attachEvent("onclick",new Function("identifierEditRow(event, 0, \"" + identifier  + "\")"));
+                    } else {
+                        TD.setAttribute("onClick","identifierEditRow(event, 0, \"" + identifier  + "\")");
+                    }                        
+                    var text = "Identifier: " + identifier;
+                    var label = document.createTextNode(text);
+                    TD.appendChild(label);
+                    TD.appendChild(createHiddenInput("identifier", identifier));
+                    table.appendChild(TD);
+                }
+            } catch(e) {
+                var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                alert("Error:\n" + msg);
+                return;
+            }
+        }
+    }
+}
+//END BRL ALTERNATE IDENTIFIER
+
 function addKeyword() {
     var keyword   = document.getElementById("keyword");
     var keywordType   = document.getElementById("keywordType");
Index: lib/style/common/templates/metacatui/entryForm.tmpl
===================================================================
--- lib/style/common/templates/metacatui/entryForm.tmpl	(revision 9632)
+++ lib/style/common/templates/metacatui/entryForm.tmpl	(revision 9633)
@@ -1226,6 +1226,7 @@
 						<div id="collapseDistribution" class="accordion-body collapse in">
 							<div class="accordion-inner">
 								<!--  the INPUT -->
+								<!--
 								<div class="control-group">
 									<label class="control-label" for="identifier">Data Set Identifier</label>
 									<div class="controls">
@@ -1237,7 +1238,86 @@
 									     data management system.</span>
 									</div>
 								</div>
+								-->
+								
+								<!-- BEGIN BRL MULTIPLE ALTERNATE IDENTIFIERS -->							
 								<div class="control-group">
+									<label class="control-label" for="identifier">Alternate Identifier</label>
+									<div class="controls">
+										<input name="identifier" id="identifier">
+										<span class="help-block">
+									     If available, please enter a name or number that uniquely identifies and
+									     describes concisely the data set. Alternatively, provide other pertinent
+									     information that can identify and locate the data set within your site's
+									     data management system.</span>
+									</div>
+								</div>
+								<div class="control-group">
+									<label class="control-label" for="addIdentifierButton"></label>
+									<div class="controls">
+										<input type="button" class="btn" value="Add Identifier" onClick="addIdentifier()">
+									</div>
+								</div>
+								
+								<div class="control-group">
+									<label class="control-label" for="identifierTable"></label>
+									<div class="controls">
+										<table>
+											<tr id="addIdentifier">
+												<td colspan="6">
+											</tr>	
+											[% numIdentifier = 0 %]
+									        [% IF identifierCount %]
+									            [% numIdentifier = identifierCount %]
+									            <tr class="sectbody" id="identifierHRRow">
+									                <td colSpan="6">
+									                    <hr width = "85%"/>
+									                </td>
+									            </tr>
+									        [% END %]
+									        <input type="hidden" name="identifierCount" value="[%numIdentifier%]" id="identifierCount">
+									    
+									        [% cnt = 1 %]
+									        [% WHILE cnt <= numIdentifier%]        
+									            <tr class="sectbody">
+									                <td class="rightCol">
+									                    <a style="cursor:pointer">
+									                        <i onClick="cleanTextNodes('identifierHRRow', 'addidentifierrow');moveUpRow(event)"
+									                        class="icon-arrow-up"
+									                        alt="Move Up"></i>
+									                    </a>
+									                    <a style="cursor:pointer">
+									                        <i onClick="cleanTextNodes('identifierHRRow', 'addidentifierrow');moveDownRow(event, 'addidentifierrow')"
+									                        class="icon-arrow-down"
+									                        alt="Move Down"></i>
+									                    </a>
+									                    <a style="cursor:pointer">
+									                        <i class="icon-remove-sign"
+									                        onClick="delRow(event)" alt="Delete"></i>
+									                    </a>
+									                </td>
+									                [% SET id = "identifierValue${cnt}" %]
+									                <td colspan="5" align ="left" style="cursor:pointer"
+									                    onClick="identifierEditRow(event, 0, '[%$id%]')">
+									                    Identifier: [%$id%]
+									                    <input name="identifier" type="hidden" value="[%$id%]"/>
+									            </tr>
+									            [% cnt = cnt + 1 %]
+									        [% END %]
+									
+									     <tr class="sectbody" id="addidentifierrow"> 
+									        <td class="bordertop" valign="top" align="right"></td>
+									        <td class="bordertop" align="left" colspan="5"></td>
+									     </tr>
+									     
+									   </table>
+									</div>
+								</div>
+								
+								<!-- END BRL ALTERNATE IDENTIFIERS --->
+								
+								
+								<div class="control-group">
 									<label class="control-label" for="dataMedium">*Data Medium</label>
 									<div class="controls">
 										[% IF form == 're_entry' && (dataMedium == "digital " || dataMedium == "digital")  %]  
Index: lib/style/common/templates/metacatui/genericResponse.tmpl
===================================================================
--- lib/style/common/templates/metacatui/genericResponse.tmpl	(revision 9632)
+++ lib/style/common/templates/metacatui/genericResponse.tmpl	(revision 9633)
@@ -66,7 +66,16 @@
                             [% END %]
                         [% END %]
                         <input type="hidden" name="funding" value="[%funding%]">
-                        <input type="hidden" name="identifier" value="[%identifier%]">
+                        
+                        [% cnt = 1 %]
+						[% WHILE cnt <= numIdentifier %]
+							[% SET id = "identifierValue${cnt}" %]
+							<input type="hidden" name="[% id %]" value="[% $id %]" />
+							<input type="hidden" name="identifier" value="[% $id %]" />
+							[% cnt = cnt + 1 %]
+						[% END %]  
+						<input type="hidden" name="identifierCount" value="[% identifierCount %]" />
+                        
                         <input type="hidden" name="title" value="[%title%]">
                         <input type="hidden" name="origNamefirst0" value="[%origNamefirst0%]">
                         <input type="hidden" name="origNamelast0" value="[%origNamelast0%]">
Index: src/perl/register-dataset.cgi
===================================================================
--- src/perl/register-dataset.cgi	(revision 9632)
+++ src/perl/register-dataset.cgi	(revision 9633)
@@ -1841,10 +1841,21 @@
 sub datasetStart() {
 	my $dataset = "<dataset>\n";
 
-	if ( hasContent($FORM::identifier) ) {
-		$dataset .= "<alternateIdentifier system=\"$FORM::site\">";
-		$dataset .= normalize($FORM::identifier) . "</alternateIdentifier>\n";
+	## handle multiple alternate identifiers
+	my $identifierArray = \@FORM::identifier;
+	debug(  "datasetStart identifier array size = " . $#$identifierArray );
+	for ( my $i = 0 ; $i <= $#$identifierArray ; $i++ ) {
+		if (   hasContent( $identifierArray->[$i] ) )
+		{
+			debug(  "Processing identifier: id = "
+				  . $identifierArray->[$i] );
+			#$dataset .= "<alternateIdentifier system=\"$FORM::site\">";
+			$dataset .= "<alternateIdentifier>";
+			$dataset .= normalize($identifierArray->[$i]) . "</alternateIdentifier>\n";
+		}
 	}
+	
+	
 	return $dataset;
 }
 
@@ -2715,15 +2726,19 @@
 
 	# find out the tag <alternateIdentifier>.
 	$results = $doc->findnodes('//dataset/alternateIdentifier');
-	if ( $results->size() > 1 ) {
-		errMoreThanOne("alternateIdentifier");
-	}
-	else {
+	if ( $results->size() > 0 ) {		
+		# handle multiple alternate identifiers
+		$results = $doc->findnodes('//dataset/alternateIdentifier');
+		my $identifierIndex = 0;
 		foreach $node ( $results->get_nodelist ) {
-			$$templateVars{'identifier'} =
-			  findValue( $node, '../alternateIdentifier' );
+			$identifierIndex++;
+			$$templateVars{ "identifierValue" . $identifierIndex } =
+			  findValue( $node, '../alternateIdentifier[' . $identifierIndex . ']' );
 		}
+		$$templateVars{'identifierCount'} = $identifierIndex;
+		
 	}
+	
 
 	# find out the tag <title>.
 	$results = $doc->findnodes('//dataset/title');
@@ -4871,7 +4886,24 @@
 	}
 
 	$$templateVars{'funding'}        = normalizeCD($FORM::funding);
-	$$templateVars{'identifier'}     = normalizeCD($FORM::identifier);
+	
+	# handle multiple identifiers
+	#$$templateVars{'identifier'}     = normalizeCD($FORM::identifier);
+	my $identifierArray = \@FORM::identifier;
+	debug(  "Processing identifier array size = " . $#$identifierArray );
+	my $identifierCount     = 1;
+	for ( my $i = 0 ; $i <= $#$identifierArray ; $i++ ) {
+		if (   hasContent( $identifierArray->[$i] ) )
+		{
+			debug(  "Processing confirm identifier: id = "
+				  . $identifierArray->[$i] );
+			$$templateVars{ "identifierValue" . $identifierCount } =
+			  normalizeCD( $identifierArray->[$i] );
+			$identifierCount++;
+		}
+	}
+	$$templateVars{'identifierCount'} = $identifierCount - 1;
+	
 	$$templateVars{'title'}          = normalizeCD($FORM::title);
 	$$templateVars{'origNamefirst0'} = normalizeCD($FORM::origNamefirst0);
 	$$templateVars{'origNamelast0'}  = normalizeCD($FORM::origNamelast0);
@@ -5178,7 +5210,33 @@
 		$$templateVars{'wg'}       = \@FORM::wg;
 	}
 	$$templateVars{'funding'}        = $FORM::funding;
-	$$templateVars{'identifier'}     = $FORM::identifier;
+	
+	# handle multiple identifier values
+	#$$templateVars{'identifier'}     = $FORM::identifier;
+	$$templateVars{'identifierCount'}    = $FORM::identifierCount;
+	debug(  "Identifier template count: " . $FORM::identifierCount );
+
+	foreach my $id ( param() ) {
+		if ( $id =~ /identifier/ ) {
+			debug(  "Processing identifier param: $id = " . param($id) );
+			
+			my $identifierIndex = $id;
+			$identifierIndex =~ s/identifierValue//;    # get the index of the parameter 0, ..., 10
+			my $idParamName = "identifierValue" . $identifierIndex;
+			debug(  "identifierIndex:" . $identifierIndex );
+			debug(  "idParamName: " . $idParamName );
+			debug(  "id: " . $id );
+			if ( $identifierIndex =~ /[0-9]+/ ) {
+				if ( hasContent( param($idParamName) ) ) {
+					debug(  "Processing template identifier: $id = "
+						  . param($idParamName) );
+					$$templateVars{$idParamName} = param($idParamName);
+				}
+			}
+		}
+	}
+	
+	
 	$$templateVars{'title'}          = $FORM::title;
 	$$templateVars{'origNamefirst0'} = $FORM::origNamefirst0;
 	$$templateVars{'origNamelast0'}  = $FORM::origNamelast0;
