defaults.setProperty(OutputKeys.ENCODING, "UTF-8"); defaults.setProperty(OutputKeys.METHOD, XML_STRING); defaults.setProperty(OutputKeys.INDENT, NO_STRING); defaults.setProperty(OutputKeys.MEDIA_TYPE, "text/xml"); defaults.setProperty(OutputKeys.OMIT_XML_DECLARATION, NO_STRING); defaults.setProperty(OutputKeys.STANDALONE, NO_STRING); defaults.setProperty(OutputKeys.VERSION, "1.0");
setDefaults(defaults, "xml");
    private Properties createOutputProperties(Properties outputProperties) {	final Properties defaults = new Properties();	defaults.setProperty(OutputKeys.ENCODING, "UTF-8");	defaults.setProperty(OutputKeys.METHOD, XML_STRING);	defaults.setProperty(OutputKeys.INDENT, NO_STRING);	defaults.setProperty(OutputKeys.MEDIA_TYPE, "text/xml");	defaults.setProperty(OutputKeys.OMIT_XML_DECLARATION, NO_STRING);	defaults.setProperty(OutputKeys.STANDALONE, NO_STRING);	defaults.setProperty(OutputKeys.VERSION, "1.0");	// Copy propeties set in stylesheet to base	final Properties base = new Properties(defaults);	if (outputProperties != null) {	    final Enumeration names = outputProperties.propertyNames();	    while (names.hasMoreElements()) {		final String name = (String) names.nextElement();		base.setProperty(name, outputProperties.getProperty(name));	    }	}	else {	    base.setProperty(OutputKeys.ENCODING, _translet._encoding);	    if (_translet._method != null)	        base.setProperty(OutputKeys.METHOD, _translet._method);	}	// Update defaults based on output method	final String method = base.getProperty(OutputKeys.METHOD);	if (method != null) {	    if (method.equals("html")) {		defaults.setProperty(OutputKeys.INDENT, "yes");		defaults.setProperty(OutputKeys.VERSION, "4.0");		defaults.setProperty(OutputKeys.MEDIA_TYPE, "text/html");	    }	    else if (method.equals("text")) {		defaults.setProperty(OutputKeys.MEDIA_TYPE, "text/plain");	    }	}	return base;     }