A NASA project named "Environmental Control and Life Support Systems"--better known by its acronym ECLSS (pronounced "EE-cliss") is attempting to demonstrate that this (what the title says) is indeed feasible.
"The Russians are ahead of us," says Robyn Carrasquillo, engineering manager for ECLSS. "The original Salyut and Mir spacecraft were able to condense humidity right out of the air and use electrolysis—an electric current run through the water—to produce oxygen for breathing." NASA's new regenerative ECLSS, to be launched to ISS in 2008, goes further: "it can recover urine in addition to humidity."
Water will be extracted form the moisture in the exhaled air and water extracted from the urine. The water will be purified to potable standard and by means of electrolysis, also used in the generation of oxygen.
Read more in Science-at-NASA.