The journalist who revealed sexual harassment allegations against federal parliamentary Speaker Peter Slipper must identify his source to a court within a week or hand over a confidential document.

News Limited's Steve Lewis lost his bid on Friday in a Federal Court to set aside a subpoena compelling him to produce the document.

But Justice Steven Rares stood the matter over until July 20.

The court has yet to learn if the document points to Speaker Peter Slipper's media adviser, James Ashby, who filed the sexual harassment claim, as the source of Mr Lewis's information, or another source whom Mr Lewis agreed to keep confidential.

Justice Rares said Mr Ashby's relationship to Mr Lewis had already been established by Mr Lewis in a radio interview and from evidence provided in the ongoing case against Mr Slipper.