Preliminary Hearing
A preliminary hearing or preliminary examination, often abbreviated as prelim, PX, or PH, is a hearing in felony cases in which a magistrate decides if there is enough evidence that the case can go to trial.
Confrontation
People v. Gonzalez (2012) 54 Cal.4th 1234, 1267.
Whitman v. Superior Court (1991) 54 Cal.3d 1063.
People v. Adams (1993) 19 Cal.App.4th 412, 432.
People v. Johns (1997) 56 Cal.App.4th 550, 554.
Penal Code 1347
Kicking people out of the courtroom
Exclusion of witnesses
The language of the statute seems to indicate it applies only to people who are witnesses for the preliminary hearing, not to people who could be witnesses at trial or other hearings. The Judges' Benchguide states this unequivocally.
Right to a public trial
Separate from whether witnesses can be excluded is the issue of non-witnesses attending. The defendant has a statutory right under PC868 to a public preliminary examination. (People v. Pompa-Ortiz (1980) 27 Cal.3d 519.) It is a substantial right, as important as the right to counsel, to cross-examine, or to present a defense, so denial of that right is an illegal commitment and subject to a PC995 motion. (Id. at p. 526)
Stroud v. Superior Court (2000) 23 Cal.4th 952 fn. 4.