Emit an xml declaration that includes the character set.
Deterimine the effective mode based on the requested version