German police have detained former cyclist and Tour de France champion Jan Ullrich for attacking and injuring a prostitute in a Frankfurt luxury hotel, a police spokeswoman said.