setIndent( OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format));
String vall = format.getProperty(OutputKeys.INDENT); if (vall != null) { setIndent( OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format)); }
    private synchronized void init(        Writer writer,        Properties format,        boolean defaultProperties,        boolean shouldFlush)    {        m_shouldFlush = shouldFlush;                // if we are tracing events we need to trace what        // characters are written to the output writer.        if (m_tracer != null         && !(writer instanceof SerializerTraceWriter)  )            m_writer = new SerializerTraceWriter(writer, m_tracer);        else            m_writer = writer;                        if (m_format == null)            m_format = new java.util.Properties();        if (format != null)        {            Enumeration propNames = format.propertyNames();            while (propNames.hasMoreElements())            {                String key = (String) propNames.nextElement();                String value = format.getProperty(key);                m_format.setProperty(key, value);            }         }        String cdataSectionNames = format.getProperty(OutputKeys.CDATA_SECTION_ELEMENTS);        addCdataSectionElements(cdataSectionNames);        setIndentAmount(            OutputPropertyUtils.getIntProperty(                OutputPropertiesFactory.S_KEY_INDENT_AMOUNT,                format));        setIndent(            OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format));                    {            String sep =                     format.getProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR);            if (sep != null) {            	this.setNewLine(sep.toCharArray());            }        }        boolean shouldNotWriteXMLHeader =            OutputPropertyUtils.getBooleanProperty(                OutputKeys.OMIT_XML_DECLARATION,                format);        setOmitXMLDeclaration(shouldNotWriteXMLHeader);        setDoctypeSystem(format.getProperty(OutputKeys.DOCTYPE_SYSTEM));        String doctypePublic = format.getProperty(OutputKeys.DOCTYPE_PUBLIC);        setDoctypePublic(doctypePublic);        // if standalone was explicitly specified        if (format.get(OutputKeys.STANDALONE) != null)        {            String val = format.getProperty(OutputKeys.STANDALONE);            if (defaultProperties)                setStandaloneInternal(val);            else                setStandalone(val);        }        setMediaType(format.getProperty(OutputKeys.MEDIA_TYPE));        if (null != doctypePublic)        {            if (doctypePublic.startsWith("-//W3C//DTD XHTML"))                m_spaceBeforeClose = true;        }        /*          * This code is added for XML 1.1 Version output.         */        String version = getVersion();        if (null == version)        {            version = format.getProperty(OutputKeys.VERSION);            setVersion(version);        }        // initCharsMap();        String encoding = getEncoding();        if (null == encoding)        {            encoding =                Encodings.getMimeEncoding(                    format.getProperty(OutputKeys.ENCODING));            setEncoding(encoding);        }        m_isUTF8 = encoding.equals(Encodings.DEFAULT_MIME_ENCODING);        // Access this only from the Hashtable level... we don't want to         // get default properties.        String entitiesFileName =            (String) format.get(OutputPropertiesFactory.S_KEY_ENTITIES);        if (null != entitiesFileName)        {            String method =                 (String) format.get(OutputKeys.METHOD);                        m_charInfo = CharInfo.getCharInfo(entitiesFileName, method);        }    }