code: public String normalizeTag(String name) {
          name = name.trim();
          if (!preserveTagCase)
              name = lowerCase(name);
          return name;
      }
docs: Normalizes a tag name according to the case preservation setting.