Holmes' apartment
© AFP/Getty Images/File, Joshua Lott
A lock secures the door leading to James Eagan Holmes' apartment in Aurora, Colorado
The suspected Batman massacre gunman was seeing a psychiatrist specializing in schizophrenia before the attack that killed 12 in Colorado, court documents showed Friday.

The motion named Dr. Lynn Fenton as defense attorneys sought to gain access to a package James Holmes had mailed to her prior the July 20 mass shooting, which also wounded 58 people.

Reports surfaced Wednesday that Holmes -- who recently dropped out of the University of Colorado -- had sent a notebook to a university psychiatrist that included details and drawing of his plans to kill people.

There were conflicting reports about whether the package reached the school in time to potentially prevent the massacre, but officials remained tight-lipped due to a strict gag order imposed by the judge overseeing the case.

Judge William Sylvester unsealed some court filings Friday after defense attorneys argued that Holmes's constitutional rights had been violated by the "breach of confidentiality and privilege" and sought "sanctions for this misconduct."

In a preview of likely battles to come, the defense lawyers also argued that the contents of the package should not be used as evidence because "Mr Holmes was a psychiatric patient of Dr Fenton, and his communications with her are protected."

Fenton teaches at the University of Colorado's medical school and heads student mental health services there in addition to conducting research into schizophrenia and other mental illnesses.

Prosecutors rebuffed the defense motion, arguing that news stories about the package contained significant factual errors and that there was no evidence the government was responsible for the leaks.

They also indicated that a FoxNews.com report that the package contained a notebook "full of details about how he was going to kill people" was incorrect.

Reports that the police "are currently examining the contents of the box" are "untrue, as the contents were secured and not examined," prosecutors said.

"These factual errors lead the People to believe that there may not even be a 'law enforcement source' 'leaking' confidential information and that the media is getting information from hoaxers, fraudsters or maybe from nobody at all by creating fake 'law enforcement sources' out of whole cloth," prosecutors wrote.

Holmes, who was studying neuroscience in a doctoral program at the University of Colorado Denver, is expected to be formally charged at his next court hearing on Monday.

Sylvester ordered a hearing on the defense motions also be held on that day.

The alleged gunman gained access to the movie theater in Aurora, Colorado outside Denver via a fire exit shortly after the screening of "The Dark Knight Rises" began and threw two canisters of noxious gas into the auditorium, witnesses said.

After firing one round directly into the air with a pump-action shotgun, he began shooting people at random with a military-style assault rifle capable of firing 50 to 60 rounds a minute.

Authorities say Holmes -- who had dyed his hair a reddish orange -- claimed he was the Joker, Batman's sworn enemy in the comic book series that inspired director Christopher Nolan's film trilogy, which features British-born actor Christian Bale as "the caped crusader."

He gave himself up outside the cinema, still clad in the body armor witnesses described the gunman wearing.

Authorities said Holmes booby-trapped his apartment with the aim of killing anyone who went outside, likely targeting police and first responders. It was days before neighbors were allowed back in the three-story building.

Holmes, 24, is being held in solitary confinement at the Arapahoe County Detention Center and could face the death penalty if convicted, although Colorado has only executed one person since capital punishment was reinstated in 1976.