Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 25354)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 25355)
@@ -97,10 +97,12 @@
 		String collection = (String) params.get(GSParams.COLLECTION);
 		String document_id = (String) params.get(GSParams.DOCUMENT);
-		if (document_id != null && document_id.equals("")) {
-		  document_id = null;
+		if (document_id != null && document_id.equals(""))
+		{
+			document_id = null;
 		}
 		String href = (String) params.get(GSParams.HREF);//for an external link : get the href URL if it is existing in the params list 
-		if (href != null && href.equals("")) {
-		  href = null;
+		if (href != null && href.equals(""))
+		{
+			href = null;
 		}
 		String rl = (String) params.get(GSParams.RELATIVE_LINK);//for an external link : get the rl value if it is existing in the params list
@@ -110,11 +112,12 @@
 			return result;
 		}
-		if (rl != null && rl.equals("0")) {
-		  // this is a true external link, we should have been directed to a different page or action
-		  logger.error("rl value was 0, shouldn't get here");
-		  return result;
+		if (rl != null && rl.equals("0"))
+		{
+			// this is a true external link, we should have been directed to a different page or action
+			logger.error("rl value was 0, shouldn't get here");
+			return result;
 		}
 		String document_type = (String) params.get(GSParams.DOCUMENT_TYPE);
-		if (document_type == null ||  document_type.equals(""))
+		if (document_type == null || document_type.equals(""))
 		{
 			document_type = "simple";
@@ -133,5 +136,5 @@
 		{
 			// we have to modify the doc name
-			doc_id_modifier =  "." + sibling_num + ".ss";
+			doc_id_modifier = "." + sibling_num + ".ss";
 		}
 
@@ -156,5 +159,5 @@
 			}
 		}
-		
+
 		UserContext userContext = new UserContext(request);
 
@@ -181,7 +184,7 @@
 		if (document_id != null)
 		{
-			current_doc.setAttribute(GSXML.NODE_ID_ATT, document_id+doc_id_modifier);
-		}
-		else 
+			current_doc.setAttribute(GSXML.NODE_ID_ATT, document_id + doc_id_modifier);
+		}
+		else
 		{
 			current_doc.setAttribute(GSXML.HREF_ID_ATT, href);
@@ -324,8 +327,8 @@
 					doc_node.setAttribute(GSXML.NODE_ID_ATT, document_id);
 				}
-				else 
+				else
 				{
 					doc_node.setAttribute(GSXML.HREF_ID_ATT, href);
-				
+
 				}
 				the_document.appendChild(doc_node);
@@ -342,5 +345,5 @@
 				doc_node.setAttribute(GSXML.NODE_ID_ATT, document_id);
 			}
-			else 
+			else
 			{
 				doc_node.setAttribute(GSXML.HREF_ID_ATT, href);
@@ -412,13 +415,13 @@
 		Element doc_node = this.doc.createElement(GSXML.DOC_NODE_ELEM);
 		// the node we want is the root document node
-		if (document_id != null) 
+		if (document_id != null)
 		{
 			doc_node.setAttribute(GSXML.NODE_ID_ATT, document_id + ".rt");
 		}
-		else 
-		{
-		  doc_node.setAttribute(GSXML.HREF_ID_ATT, href);// + ".rt");
-		  // can we assume that href is always a top level doc??
-		  //doc_node.setAttribute(GSXML.ID_MOD_ATT, ".rt");
+		else
+		{
+			doc_node.setAttribute(GSXML.HREF_ID_ATT, href);// + ".rt");
+			// can we assume that href is always a top level doc??
+			//doc_node.setAttribute(GSXML.ID_MOD_ATT, ".rt");
 			//doc_node.setAttribute("externalURL", has_rl);
 		}
@@ -507,14 +510,15 @@
 			{
 				// no content to add
-			  if (dc_response_doc.getAttribute("external").equals("true")) {
-			    
-			    //if (dc_response_doc_external != null)
-			    //{
+				if (dc_response_doc.getAttribute("external").equals("true"))
+				{
+
+					//if (dc_response_doc_external != null)
+					//{
 					String href_id = dc_response_doc.getAttribute(GSXML.HREF_ID_ATT);
 
 					the_document.setAttribute("selectedNode", href_id);
 					the_document.setAttribute("external", href_id);
-			  }
-			  return result;
+				}
+				return result;
 			}
 			if (highlight_query_terms)
@@ -716,5 +720,4 @@
 	protected Element highlightQueryTerms(Element request, Element dc_response_doc_content)
 	{
-
 		// do the query again to get term info 
 		Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
