A Sydney judge has ruled that text messages sent and received by the staffer accusing Speaker Peter Slipper of sexual harassment can be used as evidence in court.

Justice Steven Rares made the decision ahead of the case returning to the Federal Court next week.

The lawyer for staffer James Ashby had argued the messages were hearsay, but the judge ruled hearsay evidence could be used.

Mr Slipper and the Commonwealth will be now able to rely on the texts taken from Mr Ashby's phone in their application on Monday to have the case permanently stayed.

They allege the case is an abuse of the legal process because it is vexatious and deliberately aimed at damaging Mr Slipper's reputation and career.

Mr Ashby is suing his former boss and the Commonwealth, claiming Mr Slipper made unwanted advances and sent him explicit texts.

The court also heard that News Limited journalist Steve Lewis, who broke the story, will not have to hand over a document as part of a subpoena because it may reveal a confidential source.

Lewis's claim that he is protected under the Evidence Amendment (Journalists' Privilege) Act 2011 were accepted by lawyers for Mr Slipper and the Federal Government.