14. Section 31 of the principal Act is repealed and the following section substituted therefor:
—(1) Subject to subsection (2), where a child or young person is charged with any offence or is brought before a court under the provisions of this Act or any other Act —
his parent or guardian shall, unless the court otherwise orders, attend before the court during all stages of the proceedings; and
the court may compel the attendance of the parent or guardian as if he were required as a witness in the proceedings.
(2) If it appears to a court to be necessary to do so in the interest of a child or young person, the court may require his parent or guardian to withdraw from the court.”.