We consider the problem of construction of determinant formulas for the
partition function of the six-vertex model with domain wall boundary conditions 
that depend on two sets of spectral parameters.
In the pioneering works of Korepin and Izergin a determinant formula was proposed and proved
using a recursion relation. In later works, equivalent determinant formulas were given
by Kostov for the rational case and by Foda and Wheeler for the trigonometric case.
Here, we develop an approach in which the recursion relation is replaced by
a system of algebraic equations with respect to one of the two sets of spectral parameters.
We prove that this system has a unique solution. The result can be easily given as a determinant
parametrized by an arbitrary basis of polynomials. In particular,
the choice of the basis of Lagrange polynomials with respect to the remaining set of spectral
parameters leads to the Izergin--Korepin representation, and the choice of the monomial basis leads
to the Kostov and Foda--Wheeler representations.