Section 131(a) in Criminal Courts - Rules and Orders
(a)An officer or soldier required to attend a Court in his official capacity should appear in uniform with sword or side-arms. Attendance in an official capacity includes attendance-(i)as a witness, when evidence has to be given of matters which came under the cognizance of the officer or soldier in his military capacity;(ii)by an officer for the purpose of watching a case on behalf of a soldier or soldiers under his command.