
276 So.2d 267 (1973)
Abner E. HUGHES, Trustee
v.
Gregory J. M. BURGUIERES et al.
No. 52353.
Supreme Court of Louisiana.
March 26, 1973.
Rehearing Denied May 7, 1973.
Gregory J. M. Burguieres, in pro per.
Milling, Benson, Woodward, Hillyer & Pierson, G. Henry Pierson, Jr., Pilie, Pilie & Landry, Robert J. Landry, Doyle, Smith & Doyle, Donald W. Doyle, Sr., New Orleans, for plaintiff-respondent.
BARHAM, Justice.
A declaratory judgment suit was filed by Abner Hughes, as trustee for the 26 trusts *268 provided in the last will and testament of Jules M. Burguieres, against the beneficiaries of those trusts. Jules M. Burguieres died on September 7, 1960, and with the probate of his will 26 separate trusts were set up, each encompassing one-twenty-sixth of the decedent's residual estate, with Hughes as trustee for each.[1]
The decedent's will contained a proviso that the bequest to any legatee named in the will was revoked if the legatee instituted any suit making demand upon the decedent, his brothers, their estates, the estate of their deceased father, decedent's will, or the management of J. M. Burguieres Company, Ltd.[2] When Gregory Burguieres, one of the trust beneficiaries, sent a letter to the family corporation demanding that certain actions be taken and then filed a stockholders' derivative action against the corporation, the trustee instituted this suit. A court determination was sought on whether Gregory Burguieres' actions violated the conditions of the will so as to warrant forfeiture of his trust.
The trial court held that Gregory Burguieres did not violate the proscriptive provisions of the decedent's will by the institution of a suit against the corporation. It concluded, however, that since Burguieres' actions were solely responsible for causing this suit to be brought, he alone should bear the court costs and attorney's fees of $1500.00. These costs were ordered deducted from the income of the trust administered for the benefit of Gregory Burguieres.
An appeal was taken by Burguieres from the district court's judgment casting him for court costs and attorney's fees, and from the failure of that court to determine whether the decedent's will contained a prohibited substitution.[3] Neither the trustee nor the other defendants appealed or answered Burguieres' appeal. The trustee and the defendant beneficiaries simply *269 filed briefs on appeal. The Court of Appeal affirmed the ruling of the district court casting Burguieres for court costs and attorney's fees. La.App., 258 So.2d 626.
The sole question for our determination is who should pay the court costs and attorney's fees incurred by the trustee from this suit.
At the time the 26 trusts went into effect, the law regulating trusts was the Trust Estates Law (R.S. 9:1791-9:2212). Although the saving clause of our present Trust Code, R.S. 9:2252, was amended in 1968 to provide that in all administrative and procedural matters the provisions of that code apply, the former law is applicable here. Recovery of attorney's fees is allowed only when provided by statute or by contract, and adjudication of that issue presents a substantive question.
In the administration of a trust the trustee must act "solely in the interest of the beneficiary" and "exercise such care and skill as a man of ordinary prudence would exercise in dealing with his own property". Former R.S. 9:1962(2) and (6). In performance of his duties the trustee shall exercise such powers as are necessary to carry out the purposes of the trust. Former R.S. 9:1991(2). Pursuant to these duties and obligations a trustee is authorized to seek a declaration of rights or legal relations "to determine any question arising in the administration of the estate or trust, including questions of construction of wills and other writings". Art. 1874(3), C.C.P. See also R.S. 9:2233.[4] He has the power to incur expenses when necessary to carry out the purpose of the trust. Former R.S. 9:1996.
The stockholders' derivative action brought by Gregory Burguieres against the Burguieres corporation sought to enjoin the board of directors and the majority stockholders from releasing certain debts due the corporation, to have the debts promptly collected, and to recover lands that properly belonged to the corporation. Such a suit certainly presented a question of possible forfeiture of rights as a trust beneficiary under the conditions of the decedent's will, especially provision (4). See footnote 2. In the petition in this suit the trustee alleges that he was of the opinion that Gregory Burguieres' actions had violated the terms and conditions provided in the will which created the trusts, but that he felt it his duty "to the trusts and to all beneficiaries" to seek a final determination and instructions. In light of the statutory mandates regulating the functions of a trustee, the filing of this suit and the costs incurred were justified under the factual circumstances.
There can be no doubt that the trustee is entitled to have the court costs and attorney's fees paid. Former R.S. 9:2133 provided that the trustee shall be indemnified for expenses properly incurred out of the trust estate. The unique question that arises here is how these expenses are to be paid. Were the courts below correct in charging Gregory Burguieres with the court costs and attorney's fees, or should those expenses be prorated among all the 26 beneficiaries of the trusts provided by the decedent's will?
The only statutory provision in the repealed Trust Estates Law which specifically discusses attorney's fees is former R.S. 9:2101(B), which describes how such an item should be paid when the income and principal are vested in separate beneficiaries. The pertinent portion reads: "All other expenses, including * * * attorney's fees and other costs incurred in maintaining or defending any action to protect the trust or the property or to assure the title thereof, unless due to the *270 fault or cause of the income beneficiary, * * * shall be paid out of principal. * * *" (Emphasis here and elsewhere supplied.) By analogizing this provision to the circumstances in this case the Court of Appeal concluded that since Gregory Burguieres' actions were the "cause" of this suit, he alone should bear the expenses incurred by the trustee. We do not agree with that conclusion. The statute was so purposed as not to permit the use of analogy to solve the problem presented here.
The 26 trusts provided in the testament are all contingent upon the same assets and are managed by the same trustee. The trusts are all subject to the proscriptive conditions of the testament, and each bears a direct relationship to the others with regard to any action taken in violation of those conditions. In the petition in this suit the trustee recognized his duty to institute this suit on behalf of "the trusts" and for the benefit of "all beneficiaries". The fiduciary obligations owed by the trustee are the same for each beneficiary.
The petition for declaratory judgment names all of the trust beneficiaries as defendants. The issue adjudicated by the court, whether Gregory Burguieres had violated the trust provisions, from which neither the trustee nor the other 25 beneficiaries appealed, is res judicata as to all of the beneficiaries, to the trustee of all of the trusts, and therefore to all of the trusts. We do not look to the style of the suit or to the particularized wording in the prayer to determine for whom the trustee was acting. We agree with the Court of Appeal's findings that these trusts should be treated as a single trust. That court stated that the "Trustee further alleges he considered himself obligated to the remaining twenty-five beneficiaries to institute this action * * *". It also stated:
"By the terms of testator's will, we are here concerned with the novel situation of twenty-six separate and individual, but nonetheless related trusts, under the management and control of a single trustee. The will also proscribes certain designated actions which, if committed by any beneficiary, will directly affect not only his own interests, but also those of the beneficiaries of the remaining twenty-five trusts. To this extent, each individual trust bears a relationship to and has an inchoate interest in every other trust. To this degree, the individual trusts may in effect be deemed one. Equally certain is the fact that it is the obligation of the trustee to protect the interest of each individual beneficiary in the event of a suspected violation of the terms of decedent's will by one or more beneficiaries."
After this statement the appellate court assumed there to be but a single trust. However, under its analogy with former R.S. 9:2101(B) it made the determination that only the beneficiary Gregory Burguieres should pay since that court believed the suit was "due to the fault or cause of an income beneficiary". We reject this analogy and this holding.
We find the trust officer acted in accord with the requirements of the trust law, and that attorney's fees are provided when the trustee incurs them in maintaining or defending an action to protect the trust or the property or to assure the title thereto. The trustee was acting in such a capacity for all 26 beneficiaries, who were both income and principal beneficiaries.
For these reasons the judgments of the district court and the Court of Appeal are affirmed except insofar as they ordered attorney's fees and court costs assessed against the income of the trust administered for the benefit of Gregory Burguieres. It is ordered that attorney's fees and court costs be assessed and charged against the 26 trusts under the administration of the plaintiff Abner E. Hughes. Since the beneficiaries of the 26 trusts are both principal and income beneficiaries, it is ordered that these assessments be paid pro rata from the income of the 26 trusts unless the income is insufficient to discharge these debts and it becomes necessary *271 to invade the principal. The costs of the proceedings in this court are to be treated in the same manner.
HAMLIN, C. J., dissents, being of the view that the judgment of the trial court and the Court of Appeal are correct and should be affirmed.
NOTES
[1]  The Whitney National Bank of New Orleans was named in the testament as trustee of all 26 trusts, but because the bank declined, Hughes became trustee by court appointment.
[2]  The pertinent portion of the will reads:

"If, subsequent to the date of this will, any of my said legatees, including any legatee of a usufruct of a part of my estate,
"(1) files any suit, or otherwise asserts, in any legal proceeding, any claim or demand against me or my estate; or
"(2) proceeds with any such claim or demand asserted prior to the date of this will; or
"(3) attacks this will or any portion hereof; or
"(4) files any suit or otherwise asserts any claim or demand against me or my estate, or against any of my brothers or their estate concerning the management of any one of us of the financial or other affairs of the J. M. Burguieres Co., Ltd., or the management, by any of us, of the financial or other affairs of any of the descendants of my father, Jules M. Burguieres,
then, in any such events, I revoke the bequest herein made to such legatee or legatees and make the following disposition of the portion of my estate which such legatee would otherwise have acquired pursuant to this will, to-wit:
"* * *
"(2) If such legatee has been herein bequeathed a portion of my estate other than a usufruct, I direct that the part of my estate such legatee would otherwise have acquired pursuant to this will be divided among the remainder of my twenty-six nieces and nephews, hereinabove named, and groups of descendants representing predeceased nieces and nephews, in the same manner and subject to the same terms and conditions as if said legatee had predeceased me; provided, however, such legatee's descendants shall not participate in said distribution of such part of my estate."
[3]  Burguieres complains here of the failure of the Court of Appeal to pass on the question of whether the decedent's will contained a prohibited substitution. There was no necessity for discussion of that question. An action for nullity or rescission of a testament must be brought within five years. Art. 3542, La.Civ.Code. Further, an attack on a probated testament cannot be made collaterally, but must be presented by a direct action brought in the succession proceeding. Art. 2931, C.C.P.
[4]  R.S. 9:2233 is a procedural provision which is applicable to the trusts in this case. St. Charles Land Trust, Achille Guibet v. St. Amant, 253 La. 243, 217 So.2d 385 (1969) fn. 1.
