private void printString(Writer out, String str) throws IOException {
    //if (currentFormat.mode == Format.TextMode.NORMALIZE) {
    str = Text.normalizeString(str);
    //}
    //else if (currentFormat.mode == Format.TextMode.TRIM) {
    str = str.trim();
    //}
    out.write(escapeElementEntities(str));
  }
private void printString(Writer out, String str)