if (substitutions==null)
if (substitutions==null && ports==null)
public static Map prepareSubstitutions(VDBTemplateInstance templateData, Map substitutions){	 // Note: 	 // the macro values given in an expand(){} statement should not be	 // automatically passed down into any templates that are expanded within the	 // lower level file unless they are explicitly named as macros there too. 	 Map properties = null;	 if (substitutions==null)	 	properties = templateData.getProperties();	 else	 {	 	properties = (Map)templateData.getProperties().clone();				// update values	 	Iterator i = properties.keySet().iterator();	 	while (i.hasNext())	 	{	 		Object key = i.next();		 	properties.put(key, VDBTemplateInstance.applyProperties(properties.get(key).toString(), substitutions));	 	}	 }	return properties;}