When the contempt is not committed in the immediate view and presence of the court or judge, a warrant of attachment may be issued to bring the person charged to answer, or, without a previous arrest, a warrant of commitment may, upon notice, or upon an order to show cause, be granted; and no warrant of commitment can be issued without such previous attachment to answer, or such notice or order to show cause.