
408 S.E.2d 561 (1991)
COMMONWEALTH of Virginia
v.
Clifford Scott HOLTZ.
Record No. 0825-89-4.
Court of Appeals of Virginia.
August 20, 1991.
*562 Linwood T. Wells, Richmond, for appellant.
Mark J. Yeager (William J. Schewe, Jr., Graham & Schewe, Fairfax, on brief), for appellee.
Present: KOONTZ, C.J., and BARROW, BENTON, COLEMAN, DUFF, KEENAN[*], MOON, COLE[**] and WILLIS, JJ.
DUFF, Judge.
This is an appeal from an October 3, 1989, judgment of the Circuit Court of Fairfax County dismissing an information filed in an habitual offender proceeding. The Commonwealth filed the information against Clifford Holtz to have him declared an habitual offender based on two convictions for driving while intoxicated in violation of Fairfax County Code § 82-4-17 and one conviction for driving while intoxicated in violation of Virginia Code § 18.2-266. The trial court invalidated the provisions of Fairfax County Code § 82-4-21, providing for enhanced punishments in cases of driving while intoxicated in violation of Fairfax Code 82-4-17.
The Commonwealth contends on appeal that the trial court erred in ruling that Fairfax County ordinance § 82-4-21 was invalid. We agree with the trial court's ruling and affirm the judgment.
Fairfax County Code § 82-4-21, in effect at the time of Holtz's trial, provided for a lesser punishment than Virginia Code § 18.2-270. The Fairfax County ordinance stated that other local ordinances in the Commonwealth or the laws of other states could be considered as prior convictions. However, convictions under Virginia Code § 18.2-266 were not mentioned in the ordinance. Thus, Holtz's three convictions, one being under Code § 18.2-266, would be counted as only two convictions under the County ordinance and the punishment would be less than that provided by general law, Code § 18.2-270. The ordinance was, therefore, invalid under Virginia Code § 15.1-132. See Commonwealth v. Knott, 11 Va.App. 44, 47, 396 S.E.2d 148, 150 (1990).
The Commonwealth further argues that the trial court erred in failing to sever *563 the invalid portion of Fairfax County Code § 82-4-21 and apply the remaining portion. We disagree. Fairfax County Code § 1-1-11 allows the court to save any valid portions of a statutory provision held to be otherwise invalid or unconstitutional. However, if the punishment section for second or subsequent offenses is severed from Fairfax County Code § 82-4-21, the statute still violates Virginia Code § 15.1-132, by providing for a lesser punishment than Code § 18.2-270.
Finally, the Commonwealth, relying on Morse v. Commonwealth, 6 Va.App. 466, 369 S.E.2d 863 (1988), contends that Holtz was improperly permitted to collaterally attack his previous convictions. Our review of Morse satisfies us that it is clearly distinguishable from the present case. In Morse there was an attack on the sufficiency of the evidence in the original conviction. No similar attack is made in the present case. Holtz stipulated that he was the same person named in each of the prior convictions. His attack is not on those convictions, but only that one of them (the conviction under Code § 18.2-266) could not be considered as a "prior conviction" for purposes of enhanced punishment. Thus, he attacks the validity of County Code § 82-4-21.
Furthermore, the record does not demonstrate that the Commonwealth raised the collateral attack issue in the trial court. Accordingly, Rule 5A:18 bars our consideration of the issue for the first time on appeal.
We further find that the Commonwealth's notice of appeal, filed prior to the entry of the sentencing orders, was timely filed, and no new notice of appeal was necessary after the orders were entered. See Saunders v. Commonwealth, 12 Va.App. 154, 402 S.E.2d 708 (1991).
For the reasons stated above, we affirm the decision of the trial court.
Affirmed.
COLEMAN, Judge, joined by MOON, Judge, dissenting.
I am of the opinion that Clifford Scott Holtz could not in the habitual offender proceeding challenge one of the underlying convictions by undertaking to prove that Code § 82-4-21 of the Fairfax Code was invalid. Such a challenge constitutes an impermissible collateral attack upon a facially valid final judgment of a court of competent jurisdiction. See Morse v. Commonwealth, 6 Va.App. 466, 369 S.E.2d 863 (1988). In order for Holtz to challenge the conviction or the ordinance, he would have been required to raise the issue by direct appeal, or by an appropriate post conviction motion, or by an independent action collaterally attacking the conviction, such as by petition for writ of habeas corpus. See Ex parte Rollins, 80 Va. 314 (1885). See also State v. McClintock, 276 Tenn. ___, ___, 732 S.W.2d 268, 271-72 (1987); Everhart v. State, 563 S.W.2d 795, 797-98 (Tenn.Crim.App.), cert. denied (Tenn.1978); 60 C.J.S. Motor Vehicles § 164.10 (1969).
A "[c]ollateral attack is allowed only where the judgment is void, a void judgment being a judgment rendered without jurisdiction. If a judgment is merely voidable because of some other type of defect, its validity may not be impeached in a collateral proceeding." State v. Kamalski, 429 A.2d 1315, 1320 (Del.Super.Ct.1981). Holtz's challenge does not go to the jurisdiction of the court which entered the conviction. McClure v. Commonwealth, 222 Va. 690, 283 S.E.2d 224 (1981); Whorley v. Commonwealth, 215 Va. 740, 214 S.E.2d 447, cert. denied, 423 U.S. 946, 96 S.Ct. 356, 46 L.Ed.2d 277 (1975). Instead, he attempts to adjudicate in this habitual offender proceeding the validity of an ordinance upon which his earlier conviction was based. The validity of the ordinance and the conviction based upon it raises a question of trial error, and not a question of jurisdiction, Pflaster v. Town of Berryville, 157 Va. 859, 864, 161 S.E. 58, 60 (1931); therefore, a judgment of conviction based on the ordinance may be erroneous, but it is not void, and the conviction will remain viable until declared invalid in a proper proceeding. See generally Annotation, Validity and Effect of Judgment Based upon Erroneous View as to Constitutionality *564 or Validity of a Statute or Ordinance Going to the Merits, 167 A.L.R. 517, 519-22, 540-42 (1947).
Although the majority rules upon the merits of the collateral attack issue which the Commonwealth raised for the first time on appeal, the majority holds that the Commonwealth was procedurally barred from raising this issue under Rule 5A:18. Thus, because the majority purports to invoke the procedural bar, even though it fails to apply it, I am obliged to comment upon that ruling. In my opinion, Rule 5A:18 does not bar our consideration of the issue because whether a trial court has the authority in a civil habitual offender proceeding to adjudicate the collateral issue of the validity of an ordinance and conviction raises a question concerning the trial court's jurisdiction. Lack of jurisdiction can be raised for the first time on appeal. A party cannot, by failing to challenge the court's jurisdiction, confer authority to decide an issue where no such power existed. See 11B Michie's Jurisprudence Jurisdiction § 20 (1986). Additionally, because the conviction judgments were facially sufficient, the trial court committed plain error in allowing the collateral attack. The record plainly shows that the trial court should have adjudged Holtz to be an habitual offender. Therefore, in my opinion, the issue would be required to be considered on appeal under the ends of justice exception. Mounce v. Commonwealth, 4 Va.App. 433, 436, 357 S.E.2d 742, 744 (1987) (where the record affirmatively shows a miscarriage of justice has occurred). Because the facts before the court are sufficient to enable this Court to attain the ends of justice, I would reverse and, pursuant to Code § 8.01-681, enter judgment in favor of the Commonwealth declaring Holtz to be an habitual offender.
NOTES
[*]  Justice Keenan participated in the hearing and decision of this case prior to her investiture as a Justice of the Supreme Court of Virginia.
[**]  Judge Cole participated in the hearing and decision of this case prior to the effective date of his retirement on April 30, 1991 and thereafter by designation pursuant to Code § 17-116.01.
