private static boolean shouldPreserveSpace(ASTNode node, boolean defaultValue) {
    if (node.getPsi() instanceof XmlTag tag) {
      XmlAttribute spaceAttr = tag.getAttribute("xml:space");
      if (spaceAttr != null) {
        String value = spaceAttr.getValue();
        if ("preserve".equals(value)) {
          return true;
        }
        if ("default".equals(value)) {
          return false;
        }
      }
    }
    return defaultValue;
  }
private static boolean shouldPreserveSpace(ASTNode node, boolean defaultValue)