A general framework of a two-level nonoverlapping Schwarz algorithm for the Stokes problem is developed by relaxing average zero condition on pressure unknowns. This framework allows both discontinuous and continuous pressure finite element spaces. The coarse problem is built by algebraic manipulation after selecting appropriate primal unknowns just like in BDDC algorithms. Performance of the suggested algorithm is presented depending on the selection of finite elements and primal unknowns. Under the same set of primal unknowns, the algorithm for the case with discontinuous pressure functions outperforms one with continuous pressure functions. For the two-dimensional Stokes problem, the algorithm with a set of primal unknowns consisting of velocity unknowns at corners, averages of velocity components over common edges, and pressure unknowns at corners presents good scalability when continuous pressure test functions are used. In both two- and three-dimensional Stokes problems, an improvement can be made for the case with continuous pressure test functions by applying the suggested algorithm to the interface problem, which is obtained by eliminating velocity unknowns and pressure unknowns interior to each subdomains. (C) 2012 Elsevier B.V. All rights reserved.