When John Roberts and Samuel Alito were nominated to the Supreme Court, Republicans argued that they should be confirmed based on their impeccable qualifications and mainstream jurisprudence. Now, Democrats are in power, and the same standard should apply.

After listening to much of Sonia Sotomayor's testimony to the Senate Judiciary Committee and carefully examining her 17-year record as a federal appellate judge, I have come to two conclusions. First, her record is somewhat left of center, and I would likely disagree with many of her rulings if she were a Supreme Court Justice. Second, she is an extremely capable and qualified jurist.

If I were a U.S. senator, I would vote for her confirmation, because objective qualifications should matter more than ideology in the judicial confirmation process.

In determining whether a nominee is within the judicial mainstream, we should ask how he or she views the Constitution and whether he or she will administer justice impartially. Too many American judges are making up their own versions of the law rather than faithfully interpreting legal texts. Lawmaking must be reserved for the elected, politically accountable legislative and executive branches.

In general, though, Sotomayor's record does not show judicial activism. The nonpartisan Congressional Research Service's analysis noted that her opinions reveal "a dislike for situations in which the court might be seen as overstepping its judicial role." In Hankins v. Lyght, she even criticized her appeals court colleagues for violating "a cardinal principle of judicial restraint" by needlessly considering a constitutional issue. During her confirmation hearings, she stressed her belief that "the task of a judge is not to make law; it is to apply the law."

Like many people, I was troubled by Sotomayor's decision in the Ricci case and her now infamous statement about a "wise Latina." I wondered whether they revealed a permanent bias and whether she is capable of approaching all cases impartially.

I found reassurance in her long judicial record, which shows no pattern of systematic bias. Of 96 race-related cases on which Sotomayor issued a decision, she found discrimination in only 10, and nine of those decisions were unanimous. Despite some objectionable comments in speeches, when it comes to deciding cases, Sotomayor's record overwhelmingly shows impartiality on racial issues.

That does not mean I am sanguine about the prospect of a new lifetime member of the Supreme Court making decisions with which I disagree. But judges' qualifications should matter more than ideology, as long as the ideology is within the mainstream.

Ideology is important when it comes to electing public officials. In a state such as Pennsylvania, where voters elect judges, ideology can play a legitimate role in judicial elections. But in our federal constitutional framework, judicial nominations are shielded from voters.

In the federal system, judicial ideology is dealt with when we elect a president. When a president of one party is elected, the proper role of the opposing party is not to go on politically charged ideological campaigns against judicial nominees. It should be limited to determining whether a nominee is well-qualified and within the legal mainstream.

As a former member of Congress, I observed the transformation of the confirmation process into the spectacle it has become in recent years. Judge Robert Bork's personal movie-rental records were examined. Alito was asked about a college student organization he participated in decades earlier. This sordid kind of questioning serves only one purpose: assassinating a nominee's character because of presumed ideological disagreements.

Throughout most of our history, Supreme Court confirmations were not like that. The change has harmed the country and undermined the public's crucial faith in the independence and integrity in the judiciary.

This disturbing trend must stop. The Supreme Court must not become just another political body in which partisanship and ideology rule.

We Republicans have long said that the role of the Senate with respect to judges is to provide "advice and consent," not to thoughtlessly veto based on ideology. Our principles have to apply whether we are in the majority or the minority.

Pat Toomey is a former Republican Lehigh Valley congressman who is running for the U.S. Senate.