setMethod( whichMethod( doc ) ); setDoctype( whichDoctypePublic( doc ), whichDoctypeSystem( doc ) ); setMediaType( whichMediaType( getMethod() ) );
    public OutputFormat( Document doc )    {        setMethod( whichMethod( doc ) );        setDoctype( whichDoctypePublic( doc ), whichDoctypeSystem( doc ) );        setMediaType( whichMediaType( getMethod() ) );    }