
74 Cal.Rptr.2d 906 (1998)
64 Cal.App.4th 421
Arthur A. LOUBE et al., Plaintiffs and Appellants,
v.
Irving LOUBE et al., Defendants and Respondents.
No. A076627.
Court of Appeal, First District, Division One.
June 1, 1998.
Rehearing Denied June 29, 1998.
Review Denied August 19, 1998.
*907 Nelson C. Barry, Bishop, Barry, Howe, Haney & Ryer, San Francisco, Daniel U. Smith, Law Offices of Daniel U. Smith, Kentfield, for Plaintiffs and Appellants.
*908 Thomas E. Alborg, Michael J. Veiluva, Alborg, Veiluva & Cannata, Walnut Creek, for Defendants and Respondents.
Certified for Partial Publication[*]
STEIN, Associate Justice.
Appellants Arthur Loube and Janice Temple filed an action against their former attorneys, the law firm of Loube, Klein, Sacks & Associates. They appeal from a judgment that they take nothing by their complaint and that respondents be awarded attorney fees. We affirm the judgment but reverse the attorney fee award.

Background
Appellants were limited partners in a real estate partnership. They hired respondents to prosecute an action brought by them against general partners Paul Klapper and Robert Yick. Respondents filed a complaint on appellants' behalf, and ultimately took default against both Klapper and Yick. Following a prove-up hearing, each appellant was awarded $248,102 compensatory damages, $200,000 punitive damages and $7,431 attorney fees and costs. Klapper and Yick filed a motion for relief from default, asserting among other matters that the damages award was improper because no specific amount of damages had been stated in the complaint. The trial court denied the motion, but amended the judgment to reduce the award of compensatory damages to the jurisdictional minimum of $25,000.
Appellants then instituted the present action against respondents, claiming professional negligence, constructive fraud, breach of fiduciary duty and breach of contract. By their action appellants sought to hold respondents liable for the reduction in the compensatory damages awards, and also sought recovery of what they alleged to be excessive attorney fees. The trial court ruled that appellants could recover for any attorney negligence only to the extent the earlier litigation had not made them whole. The court accordingly required appellants to conduct a "trial within a trial," to prove that had the matter gone to trial they would have received an award of damages exceeding their actual recovery. Concluding that, had the matter gone to trial each appellant would have been awarded no more than $12,850 compensatory damages and would have obtained no award of punitive damages, the court granted respondents' motion for judgment.[1] The court thereafter entered judgment that appellants take nothing by their complaint and that respondents, as the prevailing parties, be awarded their costs. The court later awarded respondents attorney fees in the amount of $117,993. This appeal followed.

Discussion

I.

The Claims for Professional Negligence
In order to recover on a theory of professional negligence, it is not enough to show that the defendant breached a duty owed to the client; the client also must demonstrate that the breach of that duty caused actual loss or damages. (Budd v. Nixen (1971) 6 Cal.3d 195, 200, 98 Cal.Rptr. 849, 491 P.2d 433.) The trial court here concluded appellants in fact suffered no damages because the damages awards they in fact received exceeded the value of their claims. Appellants do not dispute the finding that each in fact suffered compensatory damages in an amount no greater than $12,850 as a result of the actions of Klapper and Yick. It follows that by receiving an award of $25,000 compensatory damages and $200,000 punitive damages, each received an award vastly exceeding the loss incurred. Appellants contend, however, that but for the negligence of respondents each would have received an even greater windfall: the $248,102 awarded to each appellant following the uncontested prove-up hearing. In a related argument appellants complain that the trial court failed simply to adopt the measure of damages awarded to them after the prove-up hearing, instead requiring them to conduct a "trial within a trial" to prove the extent of their actual loss and the damages they would have *909 been awarded had the underlying matter been fully litigated.
There appears to be no case directly on point, but appellants' position is unpersuasive for several reasons. First, it is anything but certain that, absent the alleged negligence, appellants would have received a default judgment awarding each of them $248,102 compensatory damages. For that to have occurred respondents would have had to have stated sums in the complaint equal to or greater than $248,102, Klapper and Yick would have had to have failed to respond to the complaint notwithstanding the statement of such sums and, assuming default was taken, the court ruling on a motion for relief from default would have had to deny relief in its entirety. It thus is no more than speculation that appellants would have obtained a judgment of $248,102 but for the alleged negligence of respondents. Speculative damages are not damages supporting an action for professional negligence. (Budd v. Nixen, supra, 6 Cal.3d 195, 200, 98 Cal.Rptr. 849, 491 P.2d 433.)
Second, an award of damages that exceeds actual loss runs afoul of the basic principle that damages are awarded to compensate for loss incurred. A client who has been made wholefrom whatever source thus may not maintain an action for professional negligence against her former attorney. (Arciniega v. Bank of San Bernardino (1997) 52 Cal.App.4th 213, 60 Cal.Rptr.2d 495, passim.) It is undisputed here that appellants were more than made whole by the award of $25,000 compensatory damages and $200,000 punitive damages.
Finally, we cannot endorse a rule that determines liability by measuring the amount that a client might have received in connection with a claim, rather than the actual value of the claim. It is well settled that "an attorney is liable for malpractice when his negligent investigation, advice, or conduct of the client's affairs results in loss of the client's meritorious claim [Citation.]" (Gutierrez v. Mofid (1985) 39 Cal.3d 892, 900, 218 Cal.Rptr. 313, 705 P.2d 886, italics added.) "[T]he general rule of damages [is] that when an attorney's negligence `lies in his failure to press a meritorious claim, the measure of damages is the value of the claim lost' [Citation.] As noted by two leading commentators in the legal malpractice field: `If the injury occurred because of negligence in handling litigation, the measure of direct damage is the difference between the amount of the actual judgment obtained and the judgment which should have been recovered.' [Citation.]" (Granquist v. Sandberg (1990) 219 Cal.App.3d 181, 187, 268 Cal.Rptr. 109.) The question is not what might or even what would have happened absent the alleged malpractice, but what should have happened. This distinction was addressed by the court in Mattco Forge, Inc. v. Arthur Young & Co. (1997) 52 Cal.App.4th 820, 60 Cal.Rptr.2d 780. In that case a client brought suit against a third party, and hired an accounting firm, Arthur Young & Co., to help prepare its case for litigation in the federal court. The federal action settled after the judgeJudge Gadboisissued a ruling adverse to the client. The client later brought an action for professional negligence against Arthur Young. On appeal from a judgment in favor of the client, Arthur Young argued, among other things, that the trial court had erred in rejecting its theory that in order to prevail the client would have had to show Judge Gadbois would have entered judgment on behalf of the client. Implicit in this argument was the recognition that Judge Gadbois was unlikely to rule in favor of the client. The Second District rejected the argument, finding that the test is not what would have happened, but what should have happened. "In our review of the federal judge's rulings and remarks, we find it highly likely a different federal judge would have ruled differently.... Arthur Young's proffered instruction and its arguments were fatally flawed as they focused on what Judge Gadbois would have done.... [¶] ... Even though `should' and `would' are used interchangeably by the courts, the standard remains an objective one. The trier of facts determines what should have been, not what the result would have been, or could have been, or might have been, had the matter been before a particular judge or *910 jury. [Citations.]" (Id. at p. 840, 60 Cal. Rptr.2d 780, italics in original.)
The same analysis applies here. The original award of $248,102 compensatory damages is not what should have happened, even if it is what would have happened if respondents had alleged a specific sum of damages in the complaint. That Klapper and Yick failed to answer was fortuitous, and as was demonstrated by the proceedings here, a just award of damages did not result. The just result could not be determined unless and until appellants' claims were fully litigated. Stated another way, the damages must be measured by the actual value of the claim and not by the possibility that a judgment more favorable to appellants might have been obtained. A plaintiff who in fact has been made whole is entitled to no more.
In so finding we necessarily reject the argument that the trial court erred in compelling appellants actually to litigate their claim, rather than accepting the uncontested amounts accepted at the prove-up hearing. Those amounts were relevant only to what might have been awarded and are not particularly relevant to what should have been awarded; i.e., the value of appellants' claim. Appellants contend that the trial court should have accepted the damages awarded at the prove-up hearing because it was required to adopt the procedure of the "same forum" in which the plaintiff suffered the loss. We find nothing in the authorities cited that required the trial court to adopt an incorrect measure of damages simply because the same court in the earlier action fixed a particular sum following the prove-up hearing. That the court measured damages by calculating the value of appellants' claim rather than the value of their windfall is not a procedure that varies from forum to forum; it is a measure of damages, and in our opinion the correct measure of damages.
Appellants complain that principles of judicial estoppel should have precluded respondents from arguing that appellants' claims against Klapper and Yick were essentially worthless, asserting that respondents took an "inconsistent position" by arguing at the prove-up hearing that those claims were worth $248,102. At the most, the doctrine of judicial estoppel precludes a party from taking one position in one action and an inconsistent position in another action. (See Jackson v. County of Los Angeles (1997) 60 Cal. App.4th 171, 181-183, 70 Cal.Rptr.2d 96.) Respondents were not a party to the earlier proceedings. Appellants have cited us to no authority standing for the proposition that the position taken by attorneys on behalf of their clients somehow becomes binding on the attorneys when later sued by the same clients. Indeed, given the nature of litigation and of the duty owed by an attorney to his or her client we can find no support in law or logic for such a proposition.
For all of the above reasons we conclude that the trial court correctly determined that the proper, measure of appellants' damages was the difference between the value of their claims against Klapper and Yick and the award of damages they actually received. It follows that the court correctly required appellants to prove the loss they actually incurred as a result of Klapper and Yick's actions, rather than accepting as true the damages awarded at the uncontested prove-up hearing.

II.

Appellants' Other Claims[**]

III.

Attorney Fees
Civil Code section 1717 provides in part: "(a) In any action on a contract, where the contract specifically provides that attorney's fees and costs, which are incurred to enforce that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the party prevailing on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to other costs."
The retainer agreement between appellants and respondents contained a narrowly drawn attorney fee provision, more-or-less adopting the language of Civil Code section 1717: "[I]f legal action or arbitration is necessary *911 to enforce the terms of this Agreement, the prevailing party shall recover reasonable attorneys' fees." Appellants concede that under this provision attorney fees are available to the party that prevailed on appellants' claim they had been charged excessive attorney fees. As appellants also point out, however, that claim was not actually litigated. The question here is whether the attorney fee provision authorizes an award of fees incurred in litigating appellants' claim of professional negligence.
Curiously, there seems to be no case that has addressed the question of whether an action for professional negligence is an action "on the contract" for purposes of awarding attorney fees; at least no party has cited us to such a case. It is true that, unlike ordinary negligence, professional negligence breaches a duty that exists only because the parties have a contractual agreement, and it has been recognized that an action for professional negligence constitutes both a tort and a breach of contract. (Neel v. Magana, Olney, Levy, Cathcart & Gelfand (1971) 6 Cal.3d 176, 181, 98 Cal.Rptr. 837, 491 P.2d 421.) Nonetheless, we conclude that appellants did not bring suit "on the contract." They brought suit for negligence. "Actionable legal malpractice is compounded of the same basic elements as other kinds of actionable negligence: duty, breach of duty, causation, and damage. The elements of a cause of action for professional negligence are: (1) the duty of the professional to use such skill, prudence and diligence as other members of the profession commonly possess and exercise; (2) breach of that duty; (3) a causal connection between the negligent conduct and the resulting injury; and (4) actual loss or damage resulting from the professional negligence." (Nichols v. Keller (1993) 15 Cal.App:4th 1672, 1682, 19 Cal.Rptr.2d 601.) In a somewhat analogous case, the court in Moallem v. Coldwell Banker Com. Group (1994) 25 Cal.App.4th 1827, 31 Cal.Rptr.2d 253 held that section 1717 did not authorize an award of attorney fees incurred in prosecuting a case against real estate agents for negligence and breach of fiduciary duty in connection with a purchase of real estate. The court found that in light of the plain language of the section 1717, "the statute has consistently been held not to afford recovery of fees for tort claims arising out of or related to such a contract." (Id. at p. 1830, 31 Cal.Rptr.2d 253.) It also is well-settled that "an action for fraud seeking damages sounds in tort, and is not `on a contract' for purposes of an attorney fee award, even though the underlying transaction in which the fraud occurred involved a contract containing an attorney fee clause." (Super 7 Motel Associates v. Wang (1993) 16 Cal.App.4th 541, 549, 20 Cal.Rptr.2d 193, citing Stout v. Turney (1978) 22 Cal.3d 718, 730, 150 Cal.Rptr. 637, 586 P.2d 1228; and see McKenzie v. Kaiser-Aetna (1976) 55 Cal.App.3d 84, 127 Cal.Rptr. 275; but see Perry v. Robertson (1988) 201 Cal.App.3d 333, 247 Cal.Rptr. 74.) Here, although the parties had a contractual relationship, and appellant's claim for legal negligence arose from the relationship between them, which relationship was founded on a contract, the cause of action sounded in tort and was no more "on the contract" than a claim for breach of fiduciary duty or for fraud involving a contract. It follows that Civil Code section 1717 provides no basis for an award of attorney fees.
As respondents point out, Code of Civil Procedure section 1021 authorizes an award of fees where, completely apart from Civil Code section 1717, the parties have agreed that fees will be available in the action being litigated. (Xuereb v. Marcus & Millichap, Inc. (1992) 3 Cal.App.4th 1338, 1341, 5 Cal.Rptr.2d 154.) The narrowly drawn attorney fee provision here, however, providing for the payment of fees for an action brought to enforce the terms of the parties' agreement, cannot be read as a contractual agreement to award fees in an action brought for legal malpractice.[2] We also find *912 no merit in respondent's argument that on appeal appellants are arguing points not raised below. In their opposition to respondent's motion for attorney fees, appellants specifically argued that fees were not authorized by the parties' agreement, by Civil Code section 1717 or by Code of Civil Procedure section 1021. Their appellate briefs make the same points, although they phrase the argument as error by the trial court in failing to limit the award to those services incurred to enforce the terms of the parties' contract. We conclude, therefore, that appellants are entitled to attack the trial court's award of attorney fees, and further conclude that their contentions have merit.
Finally, although it appears from the record that the majority of attorney time was directed against appellants' claim for legal malpractice, some time, presumably, was devoted to responding to appellants' claims of excessive fees. That time is compensable under Civil Code section 1717. The matter, accordingly, must be remanded so that the trial court can apportion its award of attorney fees. (See Reynolds Metals Co. v. Alperson (1979) 25 Cal.3d 124, 129, 158 Cal. Rptr. 1, 599 P.2d 83.)
The judgment is affirmed except insofar as it awards respondents their attorney fees. The matter is remanded to the trial court to redetermine attorney fees. Each party will bear its own costs on appeal.
STRANKMAN, P.J., and DOSSEE, J.,[***] concur.
NOTES
[*]  Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part II.
[1]  Code of Civil Procedure section 631.8 permits a party to move for judgment after the other party has completed its presentation of evidence.
[**]  See footnote * ante.
[2]  Contrast the fee provision in cases such as Xuereb v. Marcus & Millichap, Inc., supra, 3 Cal.App.4th 1338, 1340, 5 Cal.Rptr.2d 154: "`If this Agreement gives rise to a lawsuit or other legal proceeding between any of the parties hereto... the prevailing party shall be entitled to recover actual court costs and reasonable attorneys' fees in addition to any other relief to which such party may be entitled,'" or Lerner v. Ward (1993) 13 Cal.App.4th 155, 159, 16 Cal.Rptr.2d 486: fees to be awarded to the prevailing party in "`any action or proceeding arising out of this agreement.'"
[***]  Retired Associate Justice of the Court of Appeal, First District, assigned by the Chief Justice pursuant to article 6, section 6 of the California Constitution.
