* logic is complete.
*/
protected XMLStreamWriter2 createSW(String enc, WriterConfig cfg, XmlWriter xw) {
if (cfg.willSupportNamespaces()) {
if (cfg.automaticNamespacesEnabled()) {
return new RepairingNsStreamWriter(xw, enc, cfg);
}
return new SimpleNsStreamWriter(xw, enc, cfg);
}
return new NonNsStreamWriter(xw, enc, cfg);
}