The man accused in a machete attack on a Calgary police officer has a lengthy criminal record for weapons and violent offences including a conviction last year for assaulting an officer.

Antonio Bautista, 24, faces charges of aggravated assault, assault of a peace officer, possession of a weapon dangerous to public peace and breaching a probation order for last week's attack at Marlborough Mall.

Bautista was in court on Tuesday but Edith Thai, acting as agent for lawyer Gloria Froese, said the accused is still recovering in hospital after being shot by police and Froese has not yet been able to speak with him.

In August 2015, Bautista was charged with breaking into a house and assaulting four people including a police officer, as well as resisting arrest.

Three months later, Bautista pleaded guilty to the charge of assaulting a police officer while the other charges were withdrawn.

In July, just two months before the incident at Marlborough Mall, Bautista was convicted of escaping lawful custody and possession of a weapon. He was on probation at the time of the attack.

Bautista also has a number of prior convictions for assault, carrying a concealed weapon, theft and breaching his release conditions.

The machete used in an attack on a Calgary police officer. (ASIRT handout)

The officer was injured after police were called to the mall on the afternoon of Sept. 17, for reports of a man fighting people and swinging a machete.

When police arrived, the suspect fled into a nearby Sears store. As the officer drew his gun, the man slashed him with a 48-centimetre machete.

The injured police officer was recently released from hospital and is recovering at home. He will be off work for a "substantial amount of time," according to the Calgary Police Service.

The Alberta Serious Incident Response Team (ASIRT) is investigating.

Bautista will be back in court on Nov. 1.