A D.C. Superior Court judge yesterday refused to strike from the Nov. 6 ballot a voter initiative that would require the District government to provide overnight shelter for all the city's homeless.

Judge Richard S. Salzman held that while he believes the city eventually will prevail in its claim that the shelter measure is an improper issue for a voter initiative, residents should be allowed to vote on it pending a ruling from a higher court.

"The harm is inevitably greater in not allowing electors to vote on a matter that is before them," Salzman said. To grant the city's request, he added, "would frustrate the rights of people to vote on an issue" about which many feel strongly.

Attorneys for the city said yesterday they will appeal the ruling.

Steven O'Neil, leader of a group that gathered about 32,000 signatures to place Initiative 17 on the ballot, yesterday hailed Salzman's ruling, saying, "It's a decision we expected. We need to go forward and campaign."

Edward Norton, chairman of the D.C. Board of Elections and Ethics, which opposed the government's attempt to block the measure, also expressed satisfaction with the decision.

"We are having the initiative process further clarified, and we welcome judicial efforts to do so," Norton said. "By the same token, we feel it is important that voters be able to express their views on important matters, which is the purpose of the initiative process."

The city government filed suit against the elections board earlier this month claiming that the ballot measure, which would give homeless people legal rights to public shelter for the first time here, violates a prohibition against initiatives that deal with appropriations of city funds.

Entitling homeless people to shelter would force the City Council and the mayor to budget an undetermined amount to meet requirements of the law, they maintained.

In his ruling yesterday, Salzman held that the initiative "would tie the District's hands by making mandatory what is now voluntary."

But his ruling only dealt with the city's request for a preliminary injunction blocking a vote on the issue, which required him to balance whether the city's legal arguments would prevail, what harm the city might suffer if the request were not granted, how proponents of the measure might be injured by a court ruling and where the public interest lies.

The merits of the city's suit must still be decided, and most likely will not be judged until after the election. Salzman's decision could be overturned, however, by the D.C. Court of Appeals.

The appeals court has held in two recent cases that voter initiatives cannot be placed on the ballot if they dictate city budget action. One case involved a proposal to build a city convention center. The other, decided in August, would have required the city to restore cutbacks in unemployment benefits.

Unlike the initiative for the homeless, both of those measures were rejected by the elections board.

Officials from the D.C. Department of Human Services acknowledged during hearings before the court that they had no precise estimates of what the initiative might cost if implemented, but said it could make the city a magnet for homeless people and require millions of dollars in funding.

The city now spends about $3 million annually to provide 753 beds for the homeless.

Proponents of the measure, the D.C. Committee on Overnight Shelter, conceded that it would amount to an entitlement program, but argued that there was no evidence the city would be required to spend any more on the homeless than it does now and suggested that it might result in some savings by keeping homeless people from seeking shelter at other, more expensive city-funded facilities, such as hospitals.