0a1,2
> package com.voodoowarez.test.selenium.htmlclient;
> 
391,393c393,395
< content = content.replaceAll(" +", " ");
< content = content.replace('\u00A0', ' ');
< content = content.trim();
---
> 			content = content.replaceAll(" +", " ");
> 			content = content.replace('\u00A0', ' ');
> 			content = content.trim();
449a452,454
> 
> 		postProcessSyspropReplace(document);
> 
452a458,494
> 	void postProcessSyspropReplace(Document document) {
> 		NodeList sysprops = document.getElementsByTagName("sysprop");
> 		//System.err.println("found "+sysprops.getLength()+" sysprops for replacement");
> 		for (int i = 0; sysprops.getLength() > 0; i++) {
> 			Element sysprop = (Element) sysprops.item(0);
> 			String variable = sysprop.getAttribute("property");
> 			try
> 			{
> 				Element parent = (Element) sysprop.getParentNode();
> 	
> 				String variableValue = "";
> 				if(variable.equals(""))
> 				{
> 					System.err.println("  WARN: Found a <sysprop/> with no property attribute, ignoring element");
> 				}
> 				else
> 				{
> 					variableValue = System.getProperty(variable);
> 					if (variableValue.equals(""))
> 					{
> 						System.err.println("  WARN: System property "+variable+" not found or is empty");
> 					}
> 				}
> 
> 				Node textNode = document.createTextNode(variableValue);
> 				parent.insertBefore(textNode,sysprop);
> 				parent.removeChild(sysprop);
> 				
> 				//System.err.println("  SUCCESS: Replaced sysprop "+variable+" with "+variableValue);
> 			}
> 			catch(Exception e) {
> 				System.err.println("Error replacing variable "+variable);
> 				System.err.println("  "+e.toString());
> 			}
> 		}
> 	}
> 
