
8 So.3d 1024 (2008)
Jeffery Richard DOSECK
v.
STATE of Alabama.
CR-07-0198.
Court of Criminal Appeals of Alabama.
September 26, 2008.
Shannon A. Rash, Dothan, for appellant.
Troy King, atty. gen., and Laura I. Cuthbert, asst. atty. gen., for appellee.
WELCH, Judge.
The appellant, Jeffery Richard Doseck, pleaded guilty to second-degree escape, a violation of § 13A-10-32, Ala.Code 1975. Doseck was sentenced, as a habitual felony offender, to 15 years' imprisonment, 14 years of which were suspended, with one year to be served through the Houston County Department of Community Corrections and three years' probation.
Before entering his guilty plea, Doseck expressly reserved the right to appeal the circuit court's denial of his motion to dismiss the indictment on the ground that, based on the facts of his case, the indictment erroneously charged him with the felony offense of second-degree escape instead of the misdemeanor offense of failing to remain within the extended limits of confinement or failing to return to the place of confinement within the time prescribed, a violation of § 14-8-42, Ala.Code 1975.
At the time of his escape, Doseck was serving a sentence through the Houston County Department of Community Corrections work-release program for his conviction of the misdemeanor offense of negotiating a worthless negotiable instrument. On March 21, 2007, Doseck failed to return to the jail at the designated time of 7:00 p.m. He returned to the jail at approximately 10:00 on the following morning. He was subsequently indicted for second-degree escape.
Doseck's motion is based upon his contention that the State cannot present sufficient evidence to sustain a conviction for escape in the second degree. This court has previously held that a lack of evidence as to the elements of the offense charged in the indictment cannot be the basis for the pretrial dismissal of an indictment. In State v. Foster, 935 So.2d 1216, 1216-17 (Ala.Crim.App.2005), this court explained its rationale as follows:

*1025 "Rule 13.5(c)(1), Ala. R.Crim. P., provides:
"`A motion to dismiss the indictment may be based upon objections to the venire, the lack of legal qualifications of an individual grand juror, the legal insufficiency of the indictment, or the failure of the indictment to charge an offense.'
"The State is correct in its contention that Rule 13.5(c)(1) does not provide for the dismissal of an indictment based on the insufficiency of the evidence or, as in this case, a possible lack of evidence. See State v. Edwards, 590 So.2d 379 (Ala.Crim.App.1991) (establishment of the corpus delicti requires proof of facts by the State so entwined with the merits of the case that a decision as to whether it had been proved should not be made before trial but should be postponed until trial); State v. McClain, 911 So.2d 54 (Ala.Crim.App.2005) (trial court cannot dismiss the indictment based on a lack of evidence)."
Therefore, the indictment cannot be dismissed on the grounds Doseck raises on appeal in this case.
The dissent agrees that a motion to dismiss an indictment is not the proper avenue for challenging the sufficiency of the evidence. The dissent then states that this court has improperly considered Doseck's motion based on its style rather than its substance and that, in this case, the substance of the motion "was purely a question of lawwhether the undisputed facts constituted felony escape or misdemeanor escape." 8 So.3d at 1026. The dissent further asserts that "[t]he trial court, in denying Doseck's motion, effectively ruled that, as a matter of law, his actions constituted felony escape and not misdemeanor escape, and Doseck properly reserved that ruling of law for review on appeal during the guilty-plea colloquy." 8 So.3d at 1026. However, a trial court does not give advisory opinions on pure questions of law. Here, the trial court was asked to dismiss the indictment based on an argument that the State could not prove the facts necessary to constitute escape in the second degree, and it denied that motion. It is unclear what motion or pleading was contemplated by the dissent. Whether the trial court's legal opinion about whether the State had properly charged Doseck with escape in the second degree, based upon what the dissent argued were essentially stipulated facts, was correct or incorrect is not material to the issue decided in this case. That issue is whether a trial court can dismiss an indictment before trial based upon an expected failure of the State to be able to prove the facts constituting the offense charged in that indictment.
The dissent would create a mechanism for examining the validity of the factual underpinning of indictments that is not contemplated by the Alabama Rules of Criminal Procedure. Rule 13.5(c)(1), Ala. R.Crim. P., "does not provide for the dismissal of an indictment based on the insufficiency of the evidence or, as in this case, a possible lack of evidence." Foster, 935 So.2d at 1217. In his pretrial motion, Doseck asked the court to dismiss his indictment on a ground that would require the circuit court to determine whether the facts sufficed to establish the charged offense. There is no Rule of Criminal Procedure that provides a mechanism for a pretrial challenge to the sufficiency of the evidence. This court is not empowered to add such a mechanism to the Alabama Rules of Criminal Procedure.
This is not to suggest that a defendant cannot challenge an indictment on constitutional grounds or other grounds allowed by rule, by statute, or by other law. Because Doseck's motion to dismiss the indictment was based on a challenge of the *1026 sufficiency of the evidence, the trial court properly denied the motion. Accordingly, the judgment of the trial court is affirmed.
AFFIRMED.
BASCHAB, P.J., and WISE, J., concur. McMILLAN, J., concurs in the result. SHAW, J., dissents, with opinion.
SHAW, Judge, dissenting.
I agree with the majority that a motion to dismiss an indictment is not the proper avenue for challenging the sufficiency of the evidence. However, the majority fails to acknowledge the well settled principal that "[t]he substance of a motion and not its style determines what kind of motion it is." Evans v. Waddell, 689 So.2d 23, 24 (Ala.1997). See also Boykin v. Law, 946 So.2d 838 (Ala.2006) (treating a motion to dismiss as a motion to set aside a void judgment under Rule 60(b), Ala.R.Civ.P.); Stabler v. City of Mobile, 844 So.2d 555 (Ala.2002) (treating motion to dismiss as a motion for summary judgment); and Ex parte S.W.T., 782 So.2d 766, 767 (Ala.2000) (treating a motion requesting "`an enlargement of time in which to file a post-trial motion'" as a motion requesting an extension of time for an appeal pursuant to Rule 77(d), Ala.R.Civ.P.). The fact that Jeffery Richard Doseck's pretrial motion challenging whether his actions constituted felony escape was styled as a "Motion to Dismiss" is not dispositive of this appeal, as the majority concludes.
Although Doseck's motion was styled as a motion to dismiss, and in it Doseck requested dismissal of the indictment against him, as Doseck noted in his rebuttal to the State's response to his motion, "[t]he issue is whether or not an individual who violates the conditions of work release [by not returning to his work-release facility as scheduled] can be charged with [and convicted of] a felony when that individual is at work release due to misdemeanor convictions." (C. 9.) Doseck admitted in his motion that he failed to return to his work-release facility at his scheduled time, i.e., he stipulated to the facts as alleged by the State. The only issue presented to the trial court was purely a question of law whether Doseck's undisputed actions constituted felony escape or misdemeanor escape. See, e.g., Ex parte J.C.C., 4 So.3d 1188 (Ala.2008). The trial court, in denying Doseck's motion, effectively ruled that, as a matter of law, his actions constituted felony escape and not misdemeanor escape, and Doseck properly reserved that ruling of law for review on appeal during the guilty-plea colloquy. I would not penalize Doseck for not styling his motion properly when the pure question of law presented to this Court was properly presented to the trial court, ruled on by the trial court, and properly reserved for appellate review.
I would address the issue presented; therefore, I respectfully dissent.
