docs: protected XmlEnvironment addCommonAttributes(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) {
          String language = getLanguage();
          String namespace = StreamOpen.CLIENT_NAMESPACE;
          if (enclosingXmlEnvironment != null) {
              String effectiveEnclosingNamespace = enclosingXmlEnvironment.getEffectiveNamespaceOrUse(namespace);
              switch (effectiveEnclosingNamespace) {
              case StreamOpen.CLIENT_NAMESPACE:
              case StreamOpen.SERVER_NAMESPACE:
                  break;
              default:
                  namespace = effectiveEnclosingNamespace;
              }
          }
  
          xml.xmlnsAttribute(namespace);
          xml.optAttribute("to", getTo());
          xml.optAttribute("from", getFrom());
          xml.optAttribute("id", getStanzaId());
          xml.xmllangAttribute(language);
  
          return new XmlEnvironment(namespace, language);
      }