code: public void setMethodDefaults(String method)
    {
          String defaultMethod = m_properties.getProperty(OutputKeys.METHOD);
   
          if((null == defaultMethod) || !defaultMethod.equals(method)
           // bjm - add the next condition as a hack
           // but it is because both output_xml.properties and
           // output_unknown.properties have the same method=xml
           // for their default. Otherwise we end up with
           // a ToUnknownStream wraping a ToXMLStream even
           // when the users says method="xml"
           //
           || defaultMethod.equals("xml")
           )
          {
              Properties savedProps = m_properties;
              Properties newDefaults = 
                  OutputPropertiesFactory.getDefaultMethodProperties(method);
              m_properties = new Properties(newDefaults);
              copyFrom(savedProps, false);
          }
    }
docs: Reset the default properties based on the method.
  
  @param method the method value.
  @see javax.xml.transform.OutputKeys