
764 P.2d 1372 (1988)
307 Or. 160
The STATE of Oregon, Plaintiff,
v.
Carl Raymond CRENSHAW, Defendant. In re Contempt of Robert A. Heard. State ex rel. Carl Raymond Crenshaw, Plaintiff/Respondent, Cross-Appellant, Petitioner On Review,
v.
Robert A. Heard, Defendant/Appellant, Cross-Respondent, Respondent On Review.
TC 86-0856; CA A43247; SC S35140.
Supreme Court of Oregon, In Banc.
Argued and Submitted July 12, 1988.
Decided November 30, 1988.
*1373 Jonathan H. Fussner, Asst. Atty. Gen., Salem, argued the cause on behalf of the respondent on review.
Laura Graser, Portland, argued the cause and filed the petition on behalf of the petitioner on review.
GILLETTE, Justice.
The issues in this case in which a deputy district attorney was found in direct contempt[1] of court are whether an underlying court order may be challenged on an appeal from a judgment of contempt for refusal to obey the order, and, if such a challenge is possible, whether in this case the contemnor has shown such deficiencies in the underlying order that he should not be found in contempt. The Court of Appeals held that a contemnor may attack the underlying order in an appeal of a contempt proceeding, found that the trial court's order was not justified, and reversed the judgment of contempt. State v. Crenshaw, 90 Or. App. 212, 751 P.2d 1118 (1988). Although we agree that the underlying order in an appeal of a direct contempt may be challenged in certain circumstances, the underlying order of the trial court here was valid and the refusal to obey the order was contempt. We therefore reverse the decision *1374 of the Court of Appeals and reinstate the judgment of the trial court.
Defendant Crenshaw and others were indicted for attempted robbery and attempted burglary in July, 1986, in connection with an incident that occurred in October, 1984. Defendant filed a motion to dismiss for pre-indictment delay, a motion to compel production and other pretrial motions. An omnibus hearing was held on January 29, 1987, to consider those motions.
At the hearing, defendant's attorney requested the court to examine in camera the district attorney's file in the case of State v. William Henry Kendrick, 31 Or. App. 1195, 572 P.2d 354 (1977) for exculpatory evidence, in order to protect defendant's due process rights. See Brady v. Maryland, 373 U.S. 83, 83 S.Ct. 1194, 10 L.Ed.2d 215 (1963). Kendrick was one of those charged in connection with the same incident. The court refused defendant's request.
Defendant's attorney then asked that a copy of the file be made and sealed in order to preserve the record on appeal. The court ordered contemnor, the Washington County Deputy District Attorney who was representing the state, to turn the file over for copying and sealing. Contemnor refused. The trial court found him in contempt and imposed a fine of $100. Contemnor appealed and, as noted, the Court of Appeals reversed.
Although not raised by the parties, there are two preliminary procedural issues which should be addressed. First, ORS 33.150[2] provides that either party to a judgment in a proceeding for contempt may appeal from the judgment. ORS 33.030 provides for summary punishment of direct contempt by an order. The trial court proceeded against contemnor summarily, pursuant to ORS 33.030, and issued an order as required by that statute. Both sides apparently have accepted that the ORS 33.030 order is a "judgment in a proceeding for a contempt" and that there is, therefore, appellate jurisdiction pursuant to ORS 33.150.
We agree. The order required by ORS 33.030 is the only writing provided for in a direct contempt proceeding. It contains a determination of guilt and it prescribes punishment. ORS 33.030. It may therefore properly be considered a judgment, and appealed pursuant to ORS 33.150. See also ORS 19.010(2)(a) and (4).
The second procedural question concerns the contents of the order. The order contains a finding of contempt for failure to obey a direct order of the court. Failing to obey a court order is a violation of ORS 33.010(1)(e), which provides:
"(1) The following acts or omissions, in respect to a court of justice, or proceedings therein, are contempts of the authority of the court:
"* * *
"(e) Disobedience of any lawful judgment, decree, order or process of the court * * *."
However, the order signed by the trial judge refers instead to ORS 33.010(1)(c) (violation of a duty by an attorney). This disparity is not fatal. A citation to the wrong subsection of a statute, when the act which is being sanctioned is stated in plain language in the order, does not render the order ineffective.[3] We turn to the substantive questions.
Violations of ORS 33.010(1)(e), contempt for disobedience of a lawful order of the court, are most frequently indirect contempts. *1375 Neither party has cited any Oregon case of direct contempt for disobeying a court order in which the validity of the order was challenged.[4] This court has stated:
"It is no defense against a contempt proceeding to say that the order which has been disobeyed was not justified by the facts, or was erroneously or improvidently made; because the party has his remedy by appeal and he cannot in a collateral proceeding attack the order for mere irregularities[.]"
State v. La Follette, 100 Or. 1, 7, 196 P. 412 (1921); accord, State ex rel. Mix v. Newland, 277 Or. 191, 199-200, 560 P.2d 255 (1977).
On the other hand, this court has, on at least one occasion, allowed a contemnor to challenge an underlying order in an appeal of a contempt proceeding. In State ex rel. Dooley v. Connall, 257 Or. 94, 475 P.2d 582 (1970), the court reversed a finding of contempt because it found the underlying order to be too broad. However, the propriety of challenging the underlying order in an appeal from the contempt proceeding apparently was not raised and does not appear to have been considered by the court.
This apparent existence of two parallel rules, neither of which acknowledged the other, preoccupied the majority and dissent in the Court of Appeals. However, the distinction is more apparent than real. As this court explained in Mix, without citing Dooley:
"In essence, these decisions stand for the following general proposition. If a court has jurisdiction over the parties and the subject matter, and its order or decree is not complied with, that court may hold the noncomplying party in contempt even if it later appears that the original order or decree was either erroneous or in excess of the court's authority. The integrity of the judicial process demands compliance with court orders until such time as they are altered by orderly appellate review. Litigants are not entitled to sit in judgment on their own cases, and they must follow the appropriate channels for review of decisions they believe to be invalid. Unless and until an invalid order is set aside, it must be obeyed. Only when there has been no other opportunity to raise the issue can the validity of the underlying order be litigated in a subsequent contempt proceeding."
State ex rel. Mix v. Newland, supra, 277 Or. at 200, 560 P.2d 255. (Emphasis supplied.)
As the context indicates, by "litigate" in the emphasized portion of the foregoing quotation we meant "challenge on appeal." Obviously, a contemnor may be able to talk him  or herself out of the contempt during the same proceeding in which the original order is entered. However, in order to truly "litigate" the order  that is, to have examined in a meaningful way the legal efficacy of the order  review must occur in a court with authority to reverse the judgment of contempt. The Dooley decision may be seen as nothing more than an application of the emphasized portion of the rule from Mix, i.e., a criminal case in which the District Attorney would have no opportunity to contest the validity of the underlying order, because the state cannot appeal the result of a criminal trial. Thus, the contemnor had "no other opportunity" (short of an appeal to the generosity of the trial judge) to challenge the validity of the order, and it could be challenged on the appeal from his conviction for contempt.
In contrast to the rule in cases like State ex rel. Mix v. Newland, supra, that it is no defense to a finding of contempt that the underlying order that the contemnor disobeyed is erroneous, the rule is clear that it is a defense that the underlying order was void for lack of jurisdiction. State ex rel. Mix v. Newland, supra, 277 Or. at 191, 560 P.2d 255; State v. La Follette, supra; State ex rel. v. Downing, 40 Or. 309, 58 P. 863, 66 P. 917 (1901). *1376 This latter rule will not aid the contemnor here, however. The jurisdiction of the court in the present case is not challenged, and it is questionable whether a court in session ever lacks jurisdiction to control proceedings. In Taylor v. Gladden, 232 Or. 599, 602, 377 P.2d 14 (1962), this court held that, even if a judge should have been disqualified previously from sitting in a certain case, "he was not on that account deprived of his jurisdiction * * * to vindicate the authority of the court by punishment for contempt." We further held that, "in cases of direct contempt jurisdiction of the person of the defendant `attaches[s] instantly upon the contempt being committed in the presence of the court.'" Id. at 604, 377 P.2d 14. (Citation omitted).
As noted, the justification for the rule that there can be no non-jurisdictional collateral attack on the underlying order is that the proper remedy is not disobedience, but direct appeal or even, perhaps, a mandamus proceeding. See State v. La Follette, supra, 100 Or. at 7, 196 P. 412. If, however, there is no possibility of a direct appeal or a mandamus proceeding, or if such a proceeding would be ineffective in protecting some right or privilege, the justification for the "no collateral attack" rule disappears. State ex rel. Mix v. Newland, supra; State ex rel. Dooley v. Connall, supra.
In cases of indirect contempt, a direct appeal normally is available and, where the harm that will result from the finding of contempt is apparent and an appeal is either unavailable or would come too late to avert the harm caused by the challenged order, a discretionary writ of mandamus may be sought. But this is less true in a direct contempt proceeding, in which a person must decide immediately whether to obey the objectionable order or be found in contempt. There may be no time to seek a writ of mandamus, unless the trial judge as a matter of grace chooses to allow a period of time in which to seek the writ, and an appeal might be too late to prevent action which could do irremediable harm to some right or privilege. The state thus argues, and the Court of Appeals majority held, that the "no collateral attack" rule is inappropriate in direct contempts where an attack, either by appeal or mandamus, would be ineffective in preventing such harm.[5]
It is important to understand the scope of this argument. Not every refusal to obey a court order in the court's presence requires a direct contempt proceeding. If there is no particular need for immediate compliance with the court's order, the contemnor should be given the chance to challenge the court's order in a mandamus proceeding. In cases like the present one, on the other hand, a court could perceive a need for immediate compliance. To preserve the record, and to assure that there would be no basis later for claims that the file had been altered by addition or deletion, a court could conclude that it was necessary to copy the district attorney's file as it existed at the time of the hearing.[6] Faced with a demand for immediate compliance with the court order, a person in the *1377 position of this contemnor would have no alternative but to produce the file or be found in contempt. Neither appeal nor mandamus would help: mandamus, because invoking it would be speculative and there would not be time; appeal, because the state has no right to appeal in criminal cases.
In such circumstances, as our previous opinion in Mix recognized, some consideration of the underlying order is necessary in an appeal of the contempt, unless trial judges are to be left to enter orders without any check on the basis for their actions. We hold that a challenge to the merits of the underlying order may be made in any appeal from an order of contempt where, for constitutional, statutory or practical reasons, no other remedy, either by appeal or mandamus, was available.[7] The contemnor in this case was in such a position. He was entitled to question the validity of the underlying order in his contempt appeal.
We turn now to contemnor's arguments on the merits. Contemnor asserts that the file contains attorney work product and is therefore privileged. It is clear from the criminal discovery statutes, ORS 135.805 to 135.873, that there is a privilege for attorney work product. That privilege is limited, however. Attorney work product is not to be divulged to the criminal defendant. ORS 135.855. Defendant did not ask that any attorney work product be divulged to him or his attorney. He merely sought to preserve the record so that an appellate court later could examine the file if necessary. In camera inspections are occasionally required to enforce the discovery statutes. See, e.g., State ex rel. Dooley v. Connall, supra, 257 Or. at 103, 475 P.2d 582; State ex rel. Johnson v. Schwartz, 26 Or. App. 279, 283, 552 P.2d 571 (1976). Such an inspection would not, by itself, violate the privileged nature of the material. The copying and sealing of the material would ensure its confidentiality pending appeal.
Such an approach would also let contemnor directly attack the court's order by means of a mandamus proceeding. If contemnor prevailed in the mandamus proceeding, the copy of the file could be returned to contemnor unopened. No privilege would have been violated and no confidential material divulged. Any right or privilege asserted by contemnor would have been fully protected if contemnor had complied with the order and directly attacked it. No right or privilege would have been compromised by compliance with the order, and contemnor's challenge of the underlying order therefore fails.
Contemnor has argued that the court's order was not authorized. ORS 135.873(1) gives the court authority to "make such other order[s] as is appropriate" upon a showing of good cause in relation to discovery matters in criminal cases. Even if the court and contemnor are correct that defendant did not make a sufficient showing that defendant is entitled to discovery of any item contained in the file, that was a matter on which defendant was entitled to appeal. Defendant thus showed good cause why the record should be preserved; without it, meaningful appeal might be impossible. The order was authorized, protected contemnor's asserted privilege, and would have had the effect of properly preserving the record on appeal. See Wulff v. Sprouse-Reitz Co., Inc., 262 Or. 293, 312, 498 P.2d 766 (1972) (making requested file an exhibit was required to preserve error). The order therefore was appropriate.
The order was proper, and no right or privilege would have been violated by compliance with it pending a direct attack on it. Contemnor violated ORS 33.010(1)(e) by refusing to comply with the order.
*1378 The decision of the Court of Appeals is reversed. The judgment of the circuit court is affirmed.
NOTES
[1]  "Contempt" is defined in ORS 33.010, the pertinent portions of which are set out at page 3-4, infra. "Direct" contempt is defined, and its punishment authorized, by ORS 33.030:

"When a contempt is committed in the immediate view and presence of the court or officer, it may be punished summarily, for which an order must be made reciting the facts as occurring in such immediate view and presence, determining that the person proceeded against is thereby guilty of a contempt, and that the person be punished as therein prescribed."
[2]  ORS 33.150 provides:

"Either party to a judgment in a proceeding for a contempt may appeal therefrom, in like manner and with like effect as from a judgment in an action, but the appeal shall not stay the proceedings in any other action, suit or proceeding, or upon any judgment, decree or other therein, concerning which or wherein such contempt was committed."
[3]  The order also contained the finding, "Robert A. Heard's contemptuous conduct tended to impair the court's authority and to interrupt the due course of the omnibus hearing. (See ORS 33.010(1)(a)." Whether mere disobedience of a court order constitutes "disorderly, contemptuous or insolent behavior toward the Judge" pursuant to ORS 33.010(1)(a) is an issue which we do not address because we find that the finding and order of contempt was properly based on a violation of ORS 33.010(1)(e).
[4]  One possible explanation for the rarity of such cases is that there may be some acceptance of the position that summary punishment is "properly limited to the need to deal immediately with disruptive behavior." State ex rel. Spencer v. Howe, 281 Or. 599, 602 n. 1, 576 P.2d 4 (1978).
[5]  More precisely, the Court of Appeals majority concludes that the special position of a district attorney  and, possibly, the police  gives him or them a right to challenge the merits of the underlying order, even if other contemnors could not:

"* * * The court in [State ex rel Mix v. Newland, 277 Or 191, 560 P2d 255 (1977)] did not cite or discuss its decision in State ex rel Dooley v. Connall, [257 Or 94, 475 P2d 582 (1970)]. We have previously noted the apparent inconsistency between those cases, concluding that they `suggest that a police or district attorney contemnor in a criminal proceeding may challenge his contempt on the merits of the court's order, although a contemnor in another context may not have that option.' State ex rel Wilson v. Thomas, 74 Or App 137, 139 n 1, 700 P2d 1045, rev den 300 Or 64 [707 P.2d 582] (1985). * * *"
State v. Crenshaw, 90 Or. App. 212, 216 n. 2, 751 P.2d 1118 (1988).
[6]  The record does not suggest, and we do not imply, that any desire on the part of the court to "freeze" the record as to the contents of the District Attorney's file was actuated by a belief that the District Attorney would alter the file. So far as we can tell, the court's motivation was based entirely on a desire to make an appropriate record. We offer the additional example of justifying circumstances simply to illustrate the range of concerns that properly could motivate a judge to enter an order such as the one in this case.
[7]  While it may be true that the party most often able to take advantage of this rule will be one in the position of a district attorney, this rule is as broad as the power of contempt. All that is necessary for any contemnor to come within it is for the contemnor to face irremediable harm to a legally cognizable interest without the availability of mandamus, appeal or other adequate remedy to alleviate the harm.
