
85 Cal.Rptr.2d 414 (1999)
72 Cal.App.4th 665
Minnie BROWN, Plaintiff and Respondent,
v.
COUNTY OF LOS ANGELES et al., Defendants and Appellants.
No. B121377.
Court of Appeal, Second District, Division One.
May 27, 1999.
Lloyd W. Pellman, County Counsel, and Derrick M. Au, Deputy County Counsel, for Defendant and Appellant County of Los Angeles.
James K. Hahn, City Attorney, Ronald Tuller, Assistant City Attorney, and Judith E. Reel, Deputy City Attorney, for Defendant and Appellant City of Los Angeles.
Ezer & Williamson and Mitchel J. Ezer, Los Angeles, for Plaintiff and Respondent.
MIRIAM A. VOGEL, J.
This is a case about documentary transfer taxes and the manner in which they are to be calculated when a purchaser at a trustee's sale is neither a beneficiary nor a mortgagee of the foreclosed deed of trust. We hold that, under those circumstances, the tax must be based upon the purchase price, without regard to the amount of indebtedness attached to the property and assumed by the purchaser.


*415 FACTS
In 1994, Minnie Brown purchased real property at a trustee's sale for $255,859.42, subject to an unpaid debt of $480,691.18. When Brown (who was not a beneficiary of the foreclosed trust deed or otherwise affiliated with the property) presented the trustee's deed to the Registrar-Recorder of Los Angeles County for recording, the County assessed documentary transfer taxes of $529.10 ($1.10 per thousand dollars on the $480,691.18 unpaid debt), and the City of Los Angeles assessed documentary transfer taxes of $2,164.50 ($4.50 per thousand dollars on the $480,691.18).
In Brown's view, the documentary transfer taxes should have been based on the price she paid to purchase the property, not on the amount of the unpaid debt (in which event she would have owed the County only $281.60 and the City only $1,152). Brown paid the assessed documentary taxes under protest and then filed claims for refunds. When the claims were denied, Brown filed this action to recover the difference between the amounts she paid and the amounts she thought she ought to pay ($247.50 from the County and $1,012.50 from the City, a total of $1,260).
Brown prevailed at trial. A judgment was entered against the County for $247.50 (plus interest) and against the City for $1,012.50 (plus interest), plus attorneys' fees ($22,694.75) and costs ($675.71).[1] The City and County both appeal.

DISCUSSION

I.
The County contends the documentary transfer taxes were properly based on the amount of the unpaid debt. We disagree.

A.
As relevant, subdivision (a) of section 11911 of the Revenue and Taxation Code gives the County the right to impose a documentary transfer tax (at specified rates) for real property transferred within the County "when the consideration or value of the interest or property conveyed (exclusive of the value of any lien or encumbrance remaining thereon at the time of sale)" exceeds $100.[2] (Emphasis added; see City of Cathedral City v. County of Riverside (1985) 163 Cal.App.3d 960, 962, 210 Cal.Rptr. 60 [a "documentary transfer tax is the fee paid in connection with the recordation of deeds or other documents evidencing transfers of ownership of real property"].)[3]

B.
By an unwritten policy, the County determines "value" and computes the transfer tax based upon either the actual purchase price or the amount of the unpaid debt, whichever is greater. The County says this is a proper method for the determination of "value" as that term is used in section 11911. The trial court disagreed and so do we.
Section 11911 was enacted "to replace and was patterned after the Federal Stamp Act on conveyances which expired on that same date. (Former 26 U.S.C. §§ 4361, 4363....) Because section 11911 was patterned after the former federal act and employs virtually identical language as that act, we must infer that the Legislature intended to perpetuate the federal administrative interpretations of that federal act." (Thrifty Corp. v. County of Los Angeles (1989) 210 Cal.App.3d 881, 884, 258 Cal.Rptr. 585.) Under the pertinent federal regulations, the documentary transfer tax must be "based upon the net consideration where it is definite in amount, or may be definitely determined." (Former Fed. Tax Regs, set forth at former 26 C.F.R. § 47.4361-1, subd. (b) (1968), emphasis added.) More specifically, when a deed is given for real property sold launder foreclosure, the "tax is computed on the amount bid for the property plus the costs if paid by the *416 purchaser, whether the purchaser is the mortgagee, judgment creditor, or any other person." (Id., § 47.4361-2(a)(4), emphasis added.) By contrast, the tax is based "upon net value where the amount of the consideration is indefinite, or is left open to be fixed by future contingencies." (Id., § 47.4361-1, subd. (b); see also McGregor (Const. Ed. Bar 1981) Taxation of Real Property Transfers, § 3.211, p. 329.) Plainly, the statute means what it says, no more and no less. (See Fielder v. City of Los Angeles (1993) 14 Cal.App.4th 137, 145, 17 Cal.Rptr.2d 630 [a transfer tax is imposed "solely on the privilege of disposing of one's property and realizing its actual (as opposed to `paper') value"].)
Whatever merit there may be to an argument that the calculation is or ought to be different when the purchaser is associated with the property or the foreclosed deed, it is clear that where, as here, the purchaser is not the beneficiary or the borrower, the reference in section 11911 to "consideration" means the purchase price paid at the foreclosure sale. (Railroad Federal Sav. & Loan Ass'n v. United States (2d Cir.1943) 135 F.2d 290, 292.) Since section 11911 refers in the disjunctive to "consideration or value," it follows that the "value" of the property (whether higher or lower than, or coincidentally the same as, the purchase price) is legally irrelevant where, as here, the documentary tax is based on the purchase price (consideration) paid at the foreclosure sale.[4]
To avoid this conclusion, the County contends the "assessment of the documentary transfer tax in a non-judicial foreclosure sale on the unpaid debt rather than the purchase price is a sound tax policy." Leaving to one side the County's concession "that there may be situations in which the purchase price is more indicative of value than the unpaid debt remaining," the policy issue is one that must be argued to the Legislature, not to us. Our role is to construe the statute as it is written, not as it might have been or ought to be written.

C.
We agree with the trial court that this is not a "close case." As it was to the trial court, it is clear to us that, in assessing the documentary transfer tax against a purchaser at a trustee's sale who is not a mortgagee or a beneficiary under the foreclosed deed of trust (or otherwise related to the property), the County must calculate the transfer tax based upon the purchase price paid at the trustee's sale, not on the amount of any unpaid indebtednesswithout regard to which amount is higher than the other. Plainly, section 11911 means what it says the County's right to impose a documentary transfer tax attaches to the consideration or value of the property conveyed (exclusive of the value of any lien or encumbrance remaining thereon at the time of sale), not to the amount of any encumbrance. (See also § 11926 [exempting from the documentary transfer tax a deed in lieu of foreclosure given to a beneficiary or mortgagee, except that (as to a deed in lieu of foreclosure) the tax does apply to the extent the consideration paid exceeds the amount of the unpaid debt].)

II.
We summarily reject the County's contention that the declaratory relief judgment entered by the trial court improperly "prevents" or "enjoins" a tax. First, the constitutional prohibition cited by the County (Cal. Const., art. XIII, § 32) applies to actions against the State of California, not those involving assessments by local governments. (A & M Records, Inc. v. State Bd. of Equalization (1988) 204 Cal.App.3d 358, 369, 250 Cal.Rptr. 915; Pacific Gas & Electric Co. v. State Bd. of Equalization (1980) 27 Cal.3d 277, 281, fn. 6, 165 Cal.Rptr. 122, 611 P.2d 463.) Second, the statute cited by the County (§ 4807) applies to actions in which a taxpayer attacks a property tax, not to actions involving an excise tax (which is what the documentary transfer tax is). (Fielder v. *417 City of Los Angeles, supra, 14 Cal.App.4th at p. 145, 17 Cal.Rptr.2d 630.) Third, the availability to Brown of an action at law for a refund is not a bar to a declaratory judgment in her favor where, as here, the County has stipulated that Brown "frequently purchases property at trustee's sales." Without a declaratory judgment, the County could continue to tax her at the wrong rate. (Alameda County Land Use Assn. v. City of Hay ward (1995) 38 Cal.App.4th 1716, 1723, 45 Cal. Rptr.2d 752; Cardellini v. Casey (1986) 181 Cal.App.3d 389, 397, 226 Cal.Rptr. 659.)[5]

DISPOSITION
The judgment is affirmed. Brown is awarded her costs of appeal.
SPENCER, P.J., and MASTERSON, J., concur.
NOTES
[1]  The judgment is for a tax refund and for the declaratory relief requested by Brown.
[2]  Undesignated section references are to the Revenue and Taxation Code.
[3]  The County ordinance adopted pursuant to section 11911 uses the same "consideration or value" language. (See L.A. County Code, § 4.60.120(A); see also Los Angeles Mun.Code, § 21.9.2.)
[4]  In any event, the "value" of property sold in foreclosure is ordinarily the price paid at the forced sale, not what the property might have been worth under different circumstances. (BFP v. Resolution Trust Corporation (1994) 511 U.S. 531, 545, 114 S.Ct. 1757, 128 L.Ed.2d 556; Alliance Mortgage Co. v. Rothwell (1995) 10 Cal.4th 1226, 1250, 44 Cal.Rptr.2d 352, 900 P.2d 601; Yellen v. Fidelity & Casualty Co. of N.Y. (1931) 115 Cal.App. 434, 441, 1 P.2d 1019.)
[5]  In a separate brief, the City summarily makes the same points made by the County. The City's separate contention that the award of attorney's fees must fall with the judgment is technically correct but irrelevant in light of our conclusion that the judgment must be affirmed.
