The judge is first of all to establish the identity of the witness, then ask what relationship the witness has with the parties, and, when addressing specific questions to the witness concerning the case, also inquire about the sources of his or her knowledge and the precise time when the witness learned what he or she asserts.
Source: Code of Canon Law (Vatican.va)