code: public Set<Namespace> getAllNamespaces() {
          if (namespaceGroup == null) {
              return emptySet();
          }
          return new HashSet<Namespace>(namespaceGroup.getAllNamespaces());
      }
docs: Returns the set of all namespaces contained within the document.
  
  @return Set of namespaces, which may be empty