The petition or relation upon which the al temative wilt of manidamus, seeking to enforce the issue of a permit for repair of a certain building, was issued contained no statement that there was enacted, or that there existed, an ■ordinance of the city imposing a duty upon the building inspector to issue such permit. Much less does it disclose that .such duty was absolute or the action thereunder ministerial. The averment is as follows:
“Your petitioner further alleges and shows to the court that on the 10th day of July, A. D. 1907, pursuant to the ordinances of the city of Milwaukee, he made application to Edward V. Koch, Esq., as inspector of buildings of said city of Milwaukee, for a building permit for the erection of a brick basement under said building, and in all things complied with the ordinances of said city, and did on the 10th day of July, A. D. 1907, make due application for a permit, hereto annexed, to build said basement under said building, and did tender to and offer to file with the inspector of buildings of said city plans and specifications, hereto annexed, for the erection of said basement, and did at the same time duly tender to said inspector of buildings the legal fee therefor, as required by law; that the inspector of buildings of said city did refuse and still does refuse to grant your petitioner, as *29executor of said estate, a permit to build said basement; that-it is the duty of said inspector, under the law and ordinances of said city of Milwaukee, to issue such permit.”
No general statute imposes upon the inspector any such-duty. There was no ordinance pleaded showing any such duty, giving the relation the most liberal construction. Decker v. McSorley, 111 Wis. 91, 86 N. W. 554; McQuillan, Mun. Ordinances, § 374; Buckley v. Eisendrath, 58 Ill. App. 364. The concluding statement above quoted is a mere conclusion of law not admitted by demurrer, and not an averment of fact. It might be sufficient, in the absence of a motion to make more definite and certain, to admit proof of the ordinance. But that is not in the case here. No ordinance is offered in evidence. We are obliged to accept this statement as the ordinance or else reject it as a conclusion of the pleader. McCune v. Norwich City G. Co. 30 Conn. 521; Buffalo v. Holloway, 7 N. Y. 493; Angus v. Lee, 40 Ill. App; 304; Morton v. Comp. Gen. 4 S. C. 430. The court does not take judicial notice of municipal ordinances not pleaded. Davey v. Janesville, 111 Wis. 628, 87 N. W. 813; Pettit v. May, 34 Wis. 666; Horn v. C. & N. W. R. Co. 38 Wis. 463; Stittgen v. Rundle, 99 Wis. 78, 74 N. W. 536.
The alternative writ, which is the first process, but not the first pleading, in mandamus recited: “Whereas under the ordinances of the city of Milwaukee it was the duty of said Edward V. Koch, as such inspector of buildings, to issue unto the petitioner a permit,” etc.; but even here there is no ordinance referred to, either by its number or date of passage or publication, nor does it purport to give either the words or the substance of the ordinance, and it has only the petition to rest upon, where the averment is still more defective. The building inspector made return to the alternative writ. The relator demurredto this return. This demurrer to the return was sustained, and thereupon, without further trial, judgment was entered awarding the peremptory writ. The trial *30court should have carried the demurrer back to the first defective pleading; in this case the relation for the writ. This precise point is covered by State ex rel. Burns v. Elba, 34 Wis. 169, and State ex rel. Cuppel v. Milwaukee Cham. of Comm. 47 Wis. 670, 3 N. W. 760. This is not a technical, but a substantial and necessary, rule of law, because without it we would have the anomaly of rendering judgment for a plaintiff who had no cause of action — that is, no legal right violated — merely because the defendant’s answer was defective. This rule does not apply to defects in the complaint which may be waived by answering.
But if the relation was defective the return was grotesque. It first set forth that the duties of the Wilding inspector and the laws relating to the erection and construction of buildings are covered by ch. 3 of the general ordinances of the city.' It nowhere gives information of the contents of ch. 3, but selects two sections (7 and 10) of that chapter and sets them forth in extenso• twice, once in the body of the return and again in the order of the building inspector attached to the return as an exhibit. Sec. 7 provides for two cases, one where the building, wall, or part of a building, platform, or staging is dangerous or unsafe for the purpose for which it is being used or in danger of being set on fire because of defects in construction ; and in these cases the inspector is required, or authorized, to notify the owner, or his agent, in writing, specifying wherein the danger consists or wherein such building is unsafe and defective. If the owner, or his agent, after such notice neglects to proceed to put the building in a safe condition or forthwith to pull down or secure such building, etc., he shall be deemed guilty of a misdemeanor. The object of pleading this part of the ordinance is not apparent, unless it be to show that the building inspector did not comply with it, for it is afterward shown that, instead of acting as therein directed, he acted jointly with the health inspector, and instead of giving the notice there required they made an order *31'“that said building be tom down and removed within sixty (60) days after service upon you of this notice.” The other paragraph of this sec. 7 pleaded authorizes the inspector of "buildings and the chief of the fire department to determine upon evidence that there is actual and immediate danger of the falling of a building or some part thereof so as to endanger life, and in that case the building is to be deemed a nuisance and the inspector shall cause such work to be done as may be necessary to render said building or part thereof safe, or may cause said building, or such part thereof as may be unsafe, do be torn down or removed. The purpose of pleading this section is not obvious, because it is by its terms limited to -cases of actual and immediate danger and is to be carried out by determination upon evidence of the building inspector and the chief of the fire department, while in the instant case there is no averment or finding of actual and immediate danger to 'justify the order to tear down, and the building inspector ■seems to have disregarded its provisions by proceeding without the chief of the fire department and acting with the un.-authorized health commissioner.
The sec. 10 pleaded relates to appeals from the decision of the inspector of buildings to a board of arbitration, but does not include appeals from the emergency orders of the inspector and chief, and seems to be also wholly irrelevant. But the eapsheaf of this irrelevant return is found in the order of the arbitrators on appeal, which is also returned, as follows:
“We find that the buildings in question . . . are in a very ■dilapidated condition, which as to the two buildings known as No. 601 and No. .603 is due mainly to their age, and the present value of the foundations of the aforementioned two buildings was not taken into consideration because of their thoroughly dilapidated condition. The upper structures, after a very careful and thorough examination as to their value, were found to be damaged to a greater extent than fifty per cent, of their original cost. We therefore find that the building inspector’s and health department’s orders must *32be sustained in condemning said two buildings (N>. 601 and 603 Cherry street), but we have decided that the frame building known as No. 605 Cherry street may remain.”
However, among’ the judicial farrago in the return we find the following separable averment:
“That in the opinion of the inspector of buildings the-placing of a brick basement under said house at 601 Cherry street, as proposed in the application for permit to make alterations, would not make safe said building, for the reasons ■ hereinbefore set forth, namely, that the superstructure is so-dilapidated, rotten, and in bad condition that it will be unwise and unsafe to permit the repair of said building in such manner.”
This is a good return if the ordinances permit of any discretion on the part of the inspector in refusing permits. Rut we do not determine that point, having no assurance that we have before us the ordinances bearing on that subject. As it is, the judgment must be reversed, with orders to sustain the demurrer as a demurrer to the relation.
By the Gourt. — The judgment is reversed, and the cause-remanded with directions to sustain the demurrer to the relation.