
10 Cal.App.4th 1454 (1992)
13 Cal. Rptr.2d 593
In re TRACY L., a Person Coming Under the Juvenile Court Law.
THE PEOPLE, Plaintiff and Respondent,
v.
TRACY L., Defendant and Appellant.
In re TRACY L. on Habeas Corpus.
Docket Nos. H008394, H009329.
Court of Appeals of California, Sixth District.
November 16, 1992.
*1456 COUNSEL
Deanna F. Lamb, under appointment by the Court of Appeal, for Defendant and Appellant and Petitioner.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney General, Gerald A. Engler and Mark S. Howell, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
PREMO, J.
Tracy L., a minor, appeals from a judgment continuing his status as a ward of the court, pursuant to Welfare and Institutions Code section 602.[1] He also files a petition for a writ of habeas corpus seeking to vacate the judgment below and for the dismissal of the section 602 petition leading to that judgment. We affirm the judgment and deny the habeas corpus petition.

1. BACKGROUND
Appellant first became a ward of the court at the age of 10 following a section 602 petition charging him with 3 misdemeanors (petty theft, receiving stolen property, and battery). Since then, appellant has pursued a path of *1457 delinquent activities, including more petty thefts, vandalizing property, disturbing the peace, possession of cocaine for sale, resisting a public officer, and theft of a motorcycle.
On September 25, 1990, the instant section 602 petition was filed charging appellant with two felony counts of forcible rape (Pen. Code, § 261, subd. (a)(2)). The court sustained the petition on both counts.
At the dispositional hearing on November 26, 1990, the court committed appellant to the California Youth Authority (hereafter, Youth Authority) for a maximum period of 13 years and 9 months. The court also awarded appellant 501 days credit; imposed a $100 restitution fine which it stayed; and retained jurisdiction to impose restitution for the victim.
On June 10, 1991, appellant was ordered produced as a witness in the trial of his adult coparticipants Williams and Jordan (People v. Williams (Super. Ct. Santa Clara County, 1991, No. 144787)). Appellant, who had testified in his own trial, refused to testify in the Williams/Jordan trial, invoking his constitutional right against self-incrimination. On August 22, 1991, upon motion of the People, the trial court granted appellant immunity pursuant to Penal Code section 1324. Appellant then testified at the Williams/Jordan trial.
On January 17, 1992, during the pendency of this appeal, appellant filed with this court a petition for a writ of habeas corpus, arguing that this appeal had become moot in light of his Penal Code section 1324 immunity.
On January 29, 1992, we ordered that the habeas petition be considered together with this appeal.[2]

2. FACTS
Victim was a 14-year-old high school freshman at the time of the commission of the charged offenses. She lived in San Jose with her mother, her aunt, and her cousins, one of whom was Sarah, also a minor.
On June 17, 1990, victim and her three female cousins, including Sarah, walked to a carnival at Prusch Park in San Jose. Mario, a boyfriend of one of victim's cousins, accompanied them. The carnival was about a half mile away, a walking distance of approximately 10 minutes.
About 9 or 10 p.m., victim decided to go home because her cousins were going out to fight another group, and victim did not want to be involved in *1458 that fight. As victim left the carnival, she saw two males whom she had never seen before. One of the males was appellant. The two males initiated a conversation with victim, during which the males asked victim if she was going home. When victim answered yes, the two males offered victim a ride home, which victim accepted.
Appellant took the front passenger's seat; the other male drove the car. Victim was seated at the back. Appellant introduced himself as TC, which he said stood for Tony Curtis. The driver introduced himself as Chris.
Chris drove the car to a Motel 6. Appellant and Chris left the car, while victim remained. Appellant and Chris knocked at a door in the motel, but the door did not open. Appellant and Chris returned to the car. This time, appellant sat in the back with victim.
About three minutes of driving later, the car stopped at a house. Appellant got out of the car. When he returned, he was with another male who introduced himself as Chubs. Victim did not know Chubs before. Appellant sat in front with Chris, while Chubs sat in the back with victim.
Victim asked the men when they were going to take her home. One of the men responded that they would pick up their friends first. The car proceeded to the other side of the block where the men picked up a fourth person named James. Victim had never met James before. James seated himself in the back seat.
After about 12 to 13 minutes of driving, Chris stopped the car under a tree, near a lake, in the hills near Eastridge. The place was very dark; there were no street lights.
The men got out, went to the rear of the car, and opened the trunk. Victim sensed that the men were "moving a whole bunch of stuff back there." Victim wanted to leave because she was afraid that the men were "going to do something bad to [her]," but she had "nowhere to go."
After about five minutes, appellant reentered the back seat and asked victim if she wanted to have sex with him. Appellant's zipper was down. Victim said no, and told appellant that she just wanted to go home. Appellant pushed victim down and removed her shorts, underwear, and shoes, after which he pulled down his own pants to his knees and got on top of victim. Victim cried and told appellant to leave her alone. Appellant's penis penetrated victim's vagina, and appellant ejaculated.
Appellant got out of the car. As victim started pulling up her clothes, Chris entered with his zipper down. Chris had sexual intercourse with victim. Victim scratched Chris on the shoulder.
*1459 After Chris, James followed. Victim, who was crying, told James she "didn't want to do it." James told her she "was going to have to do it anyways." James got on top of victim and "kind of like put his fingers in me." James had sex with victim.
When James got out, Chubs entered the car. Chubs "tried to do something, but I told him I didn't want to. I was crying. He wiped my tears. And he told me he wasn't going to force me to do anything. So he got out of the car."
Appellant and Chris reentered the back seat, one after the other, and each of them had sex with appellant again.
After the sexual assault on victim, the men proceeded to a 7-Eleven store to buy some food. From there, they went to a Shell gas station. Appellant went inside the gas station. When he came out, appellant gave victim a card with his phone number and the name "Tony Curtis" written on it. The men then took victim home.
The next morning, victim told Sarah about what happened. Three or four days later, victim's mother learned about the incident. Victim's mother called the police.

3. CONTENTIONS
(1a) In the habeas corpus petition, appellant contends that since he was given immunity from further prosecution for the offenses which are on appeal, the appeal is moot and this court has jurisdiction only to remand the appeal with direction to the trial court to dismiss the charges.
On the direct appeal, appellant contends:
1. The trial court abused its discretion in denying his motion for mistrial.
2. The disposition order does not comply with section 731.1 in that the restitution order is vague and ambiguous.

4. DISCUSSION

(a) Immunity

Appellant's contention that the immunity granted him pursuant to Penal Code section 1324 covers his conviction under appeal is without merit.
(2a) "The power of government to compel persons to testify in court or before grand juries and other governmental agencies is firmly established in *1460 Anglo-American jurisprudence." (Kastigar v. United States (1972) 406 U.S. 441, 443 [32 L.Ed.2d 212, 216, 92 S.Ct. 1653].) The United States Constitution did not abrogate this power. (Id. at p. 444 [32 L.Ed.2d at pp. 216-217].) To the contrary, "[t]he power to compel testimony, and the corresponding duty to testify, are recognized in the Sixth Amendment requirements that an accused be confronted with the witnesses against him, and have compulsory process for obtaining witnesses in his favor." (Id. at pp. 443-444 [32 L.Ed.2d at p. 216].)
However, the power to compel testimony is not absolute. It is subject to a number of exemptions, foremost of which is the Fifth Amendment privilege against compulsory self-incrimination. (Kastigar v. United States, supra, 406 U.S. at p. 444 [32 L.Ed.2d at p. 216].)
The search for "a rational accommodation between the imperatives of the privilege and the legitimate demands of government to compel citizens to testify" has led to the enactment of immunity statutes, by which witnesses may be compelled to testify in exchange for immunity from prosecution. (Kastigar v. United States, supra, 406 U.S. at p. 446 [32 L.Ed.2d at p. 218].)
Immunity statutes have not been free from constitutional challenge. The earliest challenge to an immunity statute in this country was Counselman v. Hitchcock (1892) 142 U.S. 547 [35 L.Ed. 1110, 12 S.Ct. 195]. At issue in that case was a reenactment of the Immunity Act of 1868, which provided that no "evidence obtained from a [party or] witness by means of a judicial proceeding shall be given in evidence, or in any manner used against him ..., in any court of the United States...." (Id. at p. 564 [35 L.Ed. at p. 1114].) The witness in that case was granted immunity under the statute and ordered to testify before a federal grand jury. When the witness refused to testify by asserting his constitutional privilege against self-incrimination, the court adjudged him in contempt of court. On appeal, the United States Supreme Court held that the revised 1868 act afforded the witness protection only against the use of specific testimony compelled from him under the grant of immunity but not the use of his testimony to search out other testimony to be used in evidence against him. (Id. at p. 564 [35 L.Ed. at p. 1114].) Therefore, the statute did not protect the witness to the same extent that his claim of privilege against self-incrimination protected him. The witness's refusal to testify was held proper.
Reacting to the Counselman decision, and to meet the requirements set forth in that decision, the United States Congress passed the Compulsory Testimony Act of 1893, which provided that "`no person shall be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, *1461 matter or thing, concerning which he may testify, or produce evidence, documentary or otherwise....' Act of February 11, 1893, 27 Stat. 444." (Kastigar v. United States, supra, 406 U.S. at p. 451 [32 L.Ed.2d at p. 221].)
The constitutionality of this statute was challenged in Brown v. Walker (1896) 161 U.S. 591 [40 L.Ed. 819, 16 S.Ct. 644]. In that case, the appellant refused to answer certain questions in a grand jury investigation, invoking his privilege against self-incrimination. The court adjudged him in contempt of court. On appeal, the Supreme Court sustained the constitutionality of the statute, holding that "[w]hile the constitutional provision in question is justly regarded as one of the most valuable prerogatives of the citizen, its object is fully accomplished by the statutory immunity...." (Id. at p. 610 [40 L.Ed. at p. 825].) The high court concluded that the immunity provided by the statute gave appellant sufficient "protection against being brought by means of his own evidence within the penalties of the law." (Id. at p. 600 [40 L.Ed. at p. 822].) The Brown court reasoned that "if the testimony sought cannot possibly be used as a basis for, or in aid of, a criminal prosecution against the witness, the rule ceases to apply...." (Id. at p. 597 [40 L.Ed. at p. 821].)
Brown was reaffirmed in Ullmann v. United States (1956) 350 U.S. 422, 431 [100 L.Ed. 511, 520-521, 76 S.Ct. 497, 53 A.L.R.2d 1008], where the United States Supreme Court, quoting Hale v. Henkel (1906) 201 U.S. 43, 67 [50 L.Ed. 652, 662, 26 S.Ct. 370], stressed: "`The interdiction of the Fifth Amendment operates only where a witness is asked to incriminate himself  in other words, to give testimony which may possibly expose him to a criminal charge.'"
In Kastigar v. United States, supra, 406 U.S. 441, the statute under challenge was the federal witness immunity statute, 18 United States Code section 6002, which provides that when a witness is compelled by district court order to testify over a claim of the privilege, "the witness may not refuse to comply with the order on the basis of his privilege against self-incrimination; but no testimony or other information compelled under the order (or any information directly or indirectly derived from such testimony or other information) may be used against the witness in any criminal case, except a prosecution for perjury, giving a false statement, or otherwise failing to comply with the order." In holding that the immunity provided by the challenged statute measured up to the requirements of Counselman, the court stated: "The statute's explicit proscription of the use in any criminal case of `testimony or other information compelled under the order (or any information directly or indirectly derived from such testimony or other information)' is consonant with Fifth Amendment standards. We *1462 hold that such immunity from use and derivative use is coextensive with the scope of the privilege against self-incrimination, and therefore is sufficient to compel testimony over a claim of the privilege. While a grant of immunity must afford protection commensurate with that afforded by the privilege, it need not be broader. Transactional immunity, which accords full immunity from prosecution for the offense to which the compelled testimony relates, affords the witness considerably broader protection than does the Fifth Amendment privilege. The privilege has never been construed to mean that one who invokes it cannot subsequently be prosecuted. Its sole concern is to afford protection against being `forced to give testimony leading to the infliction of "penalties affixed to ... criminal acts."' Immunity from the use of compelled testimony, as well as evidence derived directly and indirectly therefrom, affords this protection. It prohibits the prosecutorial authorities from using the compelled testimony in any respect, and it therefore insures that the testimony cannot lead to the infliction of criminal penalties on the witness." (Kastigar v. United States, supra, 406 U.S. at p. 453 [32 L.Ed.2d at p. 222], fn. & italics omitted.)
In California, immunity from prosecution in exchange for compelled testimony is provided by Penal Code section 1324, which states: "In any felony proceeding or in any investigation or proceeding before a grand jury for any felony offense if a person refuses to answer a question or produce evidence of any other kind on the ground that he may be incriminated thereby, and if the district attorney of the county in writing requests the superior court in and for that county to order that person to answer the question or produce the evidence, a judge of the superior court shall set a time for hearing and order the person to appear before the court and show cause, if any, why the question should not be answered or the evidence produced, and the court shall order the question answered or the evidence produced unless it finds that to do so would be clearly contrary to the public interest, or could subject the witness to a criminal prosecution in another jurisdiction, and that person shall comply with the order. After complying, and if, but for this section, he would have been privileged to withhold the answer given or the evidence produced by him, that person shall not be prosecuted or subjected to penalty or forfeiture for or on account of any fact or act concerning which, in accordance with the order, he was required to answer or produce evidence...."
As may be noted, the language of Penal Code section 1324 is quite different from that of the Compulsory Testimony Act of 1893, which has "provided the label and model for transactional immunity statutes. *1463 [Citations.]"[3] (People v. Campbell (1982) 137 Cal. App.3d 867, 872 [187 Cal. Rptr. 340].) For, while the 1893 federal statute (49 U.S.C. § 46) provides, in part, that "no person shall be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, matter or thing, concerning which he may testify, or produce evidence, documentary or otherwise" (italics added), Penal Code section 1324 states that "that person shall not be prosecuted or subjected to penalty or forfeiture for or on account of any fact or act concerning which, in accordance with the order, he was required to answer or produce evidence." (Italics added.) Arguably, "fact or act" is narrower in scope than "transaction, matter or thing"; however, since a semantic excursion into the exact connotation of those terms is not required to resolve the issue before us, we shall not attempt to do so. Suffice it to observe, as the court did in People v. Campbell, supra, 137 Cal. App.3d at page 875, that "[t]he language difference is without significance for it must, in any event, be fit to constitutional dimensions."[4]
In People v. Campbell, supra, 137 Cal. App.3d at page 874, the court held that the immunity provided by Penal Code section 1324 is transactional immunity. Campbell defined "transactional immunity" as that kind of immunity which "immunizes the defendant from prosecution for any offense which is implicated by the compelled testimony whether or not the testimony is in fact used." (137 Cal. App.3d at p. 874.) It distinguished "transactional immunity" from "use immunity" which "precludes punishment for the compelled disclosures by cutting the causal link between the incriminating testimony and its use through the exclusion of the compelled testimony or any evidence derived from it." (Id. at pp. 873-874.)
Because the history of Penal Code section 1324 is rooted in the Compulsory Testimony Act of 1893 and the cases interpreting that statute, notably Brown v. Walker, supra, 161 U.S. 591, and Ullmann v. United States, supra, *1464 350 U.S. 422, we must presume that when the California Legislature patterned its immunity statute after the Compulsory Testimony Act of 1893, it likewise adopted the construction given to that statute by the highest court of the land. (3) It is a cardinal rule of statutory construction that "where a statute is patterned after legislation of another state, or of the federal government, or, indeed of a foreign country, which has been judicially construed in the jurisdiction of its enactment," there is a "very strong presumption of intent to adopt the construction... of the prior enactment." (Union Oil Associates v. Johnson (1935) 2 Cal.2d 727, 735 [43 P.2d 291, 98 A.L.R. 1499].) (2b) Consequently, the immunity provided by Penal Code section 1324 must be understood to be limited to immunity "from future prosecution based on knowledge and sources of information obtained from the compelled testimony." (Ullmann v. United States, supra, 350 U.S. at p. 437 [100 L.Ed. at pp. 523-524], italics added.)
Indeed, in all the relevant cases decided by the United States Supreme Court (Counselman v. Hitchcock, supra, 142 U.S. 547; Brown v. Walker, supra, 161 U.S. 591; Ullmann v. United States, supra, 350 U.S. 422; and Kastigar v. United States, supra, 406 U.S. 441), the conceptual framework of the immunity has always been immunity from future prosecution. One departure from this precedent was made by the Court of Appeal, District of Columbia Circuit, in Frank v. United States (1965) 347 F.2d 486 [120 App.D.C. 392]. In that case, the court held that "the Government may not convict a person and then, pending his appeal, compel him to give self-accusatory testimony relating to the matters involved in the conviction." (347 F.2d at p. 491.) Frank is, however, of dubious precedential value because its analysis was disapproved by the United States Supreme Court in a footnote in Katz v. United States (1967) 389 U.S. 347, 349, footnote 3 [19 L.Ed.2d 576, 580-581, 88 S.Ct. 507]. In disapproving the reliance on Frank, the Katz court stated: "We find no merit in the petitioner's further suggestion that his indictment must be dismissed. After his conviction was affirmed by the Court of Appeals, he testified before a federal grand jury concerning the charges involved here. Because he was compelled to testify pursuant to a grant of immunity [citation], it is clear that the fruit of his testimony cannot be used against him in any future trial. But the petitioner asks for more. He contends that his conviction must be vacated and the charges against him dismissed lest he be `subjected to [a] penalty ... on account of [a] ... matter ... concerning which he [was] compelled ... to testify....' 47 U.S.C. § 409(l). Frank v. United States, 347 F.2d 486. We disagree. In relevant part, § 409(l) substantially repeats the language of the Compulsory Testimony Act of 1893 [citation], which was Congress' response to this Court's statement that an immunity statute can supplant the Fifth Amendment privilege against self-incrimination only if it affords adequate protection from future prosecution or conviction. [Citation.] The statutory provision here involved was designed ... not to confer immunity from *1465 punishment pursuant to a prior prosecution and adjudication of guilt. [Citation.]" (389 U.S. at p. 349, fn. 3 [19 L.Ed.2d at pp. 580-581], italics added.)
Indeed, immunity from future prosecution is the only sense in which Penal Code section 1324 can be understood to provide. This is clear from the fact that immunity under that section is granted only "for or on account of any fact or act concerning which, in accordance with the order, he was required to answer or produce evidence." "For or on account of" connotes causal relationship. Thus, where no causal relationship, direct or indirect, exists between the compelled testimony and the prosecution, penalty, or forfeiture, Penal Code section 1324 does not apply.
(1b) In the instant case, appellant was already convicted and sentenced when he was called to testify at the Williams/Jordan trial. He was convicted by evidence adduced at his own trial, not by anything he said at the Williams/Jordan trial. No part of appellant's testimony at the Williams/Jordan trial, or any derivative thereof, was taken as evidence against him in this case. Therefore, his testimony at the Williams/Jordan trial did not in any manner incriminate him in this case. As stated in People v. Stewart (1969) 1 Cal. App.3d 339, 343 [81 Cal. Rptr. 562]: "It is a complete answer to appellant's argument to state that sentence was not imposed by reason of any question he might have answered or for any evidence he might have produced at the trial of Timmons. Sentence was imposed solely by reason of his prior voluntary plea of guilty to the charge of robbery. Such a plea, of course, removed appellant from the protection against self-incrimination afforded by the Fifth Amendment to the Constitution of the United States and from the purview of section 1324 of the Penal Code insofar as it related to that particular offense."
The fact that the conviction in Stewart resulted from a guilty plea whereas the conviction here resulted from a trial on the merits is of no moment. The point is, the guilt of the defendant was determined prior to the compelled testimony on the basis of evidence totally independent of that testimony.
In fact, it can be said that appellant's conviction in the instant case was not because of appellant's taking the stand, but in spite of it. Appellant did not take the stand to admit his guilt, but to defend himself. His testimony was not self-incriminatory; it was exculpatory.
(4) In any event, by taking the stand, appellant effectively waived his privilege against self-incrimination. Having done so, he cannot be permitted in the same case to invoke the Penal Code section 1324 immunity defense for testifying on the same matter in the trial of his coparticipants in the same *1466 crimes. As the court in Brown v. Walker, supra, 161 U.S. at page 597 [40 L.Ed. at p. 821], observed: "[I]f the witness himself elects to waive his privilege, as he may doubtless do, since the privilege is for his protection and not for that of other parties, and discloses his criminal connections, he is not permitted to stop, but must go on and make a full disclosure. [Citations.]"
The case of People v. Lopez (1980) 110 Cal. App.3d 1010 [168 Cal. Rptr. 378], relied on by appellant, is distinguishable. There, the court stated: "We conclude that a witness who has been convicted of a crime and who has appealed that conviction cannot be compelled to testify in the trial of a codefendant pending the resolution of that appeal." (Id. at p. 1021.) The statement was made in a different context, however. Lopez was not a Penal Code section 1324 case involving immunity from prosecution in exchange for compelled testimony. In that case, three participants to the same crime were tried separately. Two of the defendants were Lopez and Torres. Torres was convicted at his trial and appealed his conviction. Pending Torres's appeal, the issue came up at Lopez's trial concerning the admissibility of a statement against penal interest that Torres had made out of court to his girlfriend. Lopez objected to the admissibility of Torres's statement on the ground that Torres was available as a witness. The People argued that Torres was unavailable because he could not be compelled to testify at Lopez's trial since to do so would violate Torres's Fifth Amendment privilege against self-incrimination. The Lopez court agreed with the People and held that since Torres could not be compelled to testify at the Lopez trial, Torres was unavailable as a witness and therefore his out-of-court statement was admissible. The issue of whether Torres could have been compelled to testify in exchange for a Penal Code section 1324 immunity was never raised nor discussed. Clearly, Lopez has no contextual application to this case.
(1c) In sum, we conclude that the transactional immunity granted to appellant pursuant to Penal Code section 1324 does not cover his conviction in this case. Appellant's petition for a writ of habeas corpus is, accordingly, denied.

(b), (c)[*]
.... .... .... .... .... .... .... .

5. DISPOSITION
The judgment is affirmed in all respects, and the matter remanded to the juvenile court with direction to that court to determine whether restitution is *1467 likely to be necessary, and, if so, to comply with section 731.1 by specifying a reasonable time limit to return to court to resolve the matter by stipulation or hearing. The petition for a writ of habeas corpus is denied.
Capaccioli, Acting P.J., and Elia, J., concurred.
A petition for a rehearing was denied December 11, 1992, and the opinion was modified to read as printed above. Appellant's petition for review by the Supreme Court was denied February 18, 1993.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of parts 4(b) and 4(c).
[1]  Further statutory references are to the Welfare and Institutions Code unless otherwise stated.
[2]  Appellant subsequently filed a petition for a writ of mandate against this court with the Supreme Court, praying that court to compel this court to grant his petition for a writ of habeas corpus. On March 11, 1992, the Supreme Court denied the mandate petition.
[3]  We are not comparing Penal Code section 1324 with 18 United States Code section 6002 because the present Penal Code section 1324, which was adopted in 1953, antedated 18 United States Code section 6002, which was enacted in 1970, and hence could not been based upon the latter statute.
[4]  Originally, when it was enacted in 1911, Penal Code section 1324 employed the language of the Compulsory Testimony Act of 1893. In pertinent part, Penal Code section 1324 initially provided that a person claiming the privilege against self-incrimination can be compelled to testify but that "he shall not be liable thereafter to prosecution ... for the offense with reference to which his testimony was given, or for or on account of any transaction, matter or thing concerning which he may have testified...." (See Stats. 1911, ch. 293, § 1, p. 485, italics added; People v. Campbell, supra, 137 Cal. App.3d at p. 875.) In 1917, this statute was repealed. (Stats. 1917, ch. 198, p. 291.) In 1953, Penal Code section 1324 was re-adopted, but the pertinent terminology was changed from "transaction, matter or thing" to "fact or act." (See Stats. 1953, ch. 1353, § 1, p. 2912.) There have been further amendments to Penal Code section 1324 since 1953, but they are not relevant to this discussion.
[*]   See footnote, ante, page 1454.
