The declaration of the accused, the formal parts of which may be written or printed, or partly written and partly printed, duly authenticated by a justice as having been emitted before him according to the existing law and practice, shall be received in evidence without being sworn to by witnesses, either for the prosecution or for the accused, but it shall be competent for the accused, before such declaration is read to the court, to adduce as witnesses the persons who were present when the declaration was emitted, and to examine them upon any matters regarding such declaration on which it would be competent to examine them according to the existing law and practice, and to move the court to refuse to allow the declaration to be read on grounds appearing on the face of the declaration itself, or on the ground of what is disclosed in such evidence or on both of those grounds, and where the accused objects to the declaration, the prosecutor shall be entitled to examine any witnesses in regard thereto whom the accused may be entitled to examine as aforesaid.