private @Nullable String getXmlApiCompatibleNamespace(DomInvocationHandler parent) {
    final XmlTag tag = parent.getXmlTag();
    if (tag == null) {
      return null;
    }

    String ns = getXmlName().getNamespace(tag, parent.getFile());
    // TODO: this seems ugly
    return tag.getNamespace().equals(ns) ? null : ns;
  }
private @Nullable String getXmlApiCompatibleNamespace(DomInvocationHandler parent)