Section 9. A person shall not be punished for a crime unless he has been legally convicted thereof by a court having competent jurisdiction of the cause and of the person.