@Override
    public Transformer createTransformer(final Document... document) {
        try {
            Transformer transformer = createTransformerFactory().newTransformer();
            if (isPrettyPrinting()) {

                // Enable some pretty printing of the resulting xml.
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            }
            if (isOmitXMLDeclaration()) {
                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
            }
            return transformer;
        } catch (TransformerConfigurationException e) {
            throw new XBException("Error on creating transformer", e);
        }
    }
@ Override public Transformer createTransformer ( final Document ... document ) { try { Transformer transformer = createTransformerFactory ( ) . newTransformer ( ) ; if ( isPrettyPrinting ( ) ) { transformer . setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "2" ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; } if ( isOmitXMLDeclaration ( ) ) { transformer . setOutputProperty ( OutputKeys . OMIT_XML_DECLARATION , "yes" ) ; } return transformer ; } catch ( TransformerConfigurationException e ) { throw new XBException ( "Error on creating transformer" , e ) ; } }
{@inheritDoc}