protected void printText(Writer out, Text text) throws IOException {
    String str = (currentFormat.mode == Format.TextMode.NORMALIZE)
                 ? text.getTextNormalize()
                 : ((currentFormat.mode == Format.TextMode.TRIM) ?
                    text.getText().trim() : text.getText());
    out.write(escapeElementEntities(str));
  }
protected void printText(Writer out, Text text)