If there is no stipulation to the contrary, the costs of the registrations, the advance of which is made by the registrant, shall be borne by the debtor, and the costs of the publication of the deed of sale, which may be required by the vendor with a view to the registration of his legal mortgage, shall be borne by the purchaser.