Translated from Taishō Tripiṭaka volume 2, number 99
Thus have I heard. At one time, the Buddha was dwelling near the village of Nādikā, at a guest residency in the forest. At that time, Kātyāyana Gotra approached the place of the Buddha. Bowing his head at the feet of the Buddha, he then withdrew to one side, and addressed the Buddha, saying, “Bhagavān, as the Bhagavān speaks of ‘right view,’ what is right view? What does the Bhagavān establish as right view?”
The Buddha told Kātyāyana Gotra, “The worldly have two kinds of support to which they grasp and adhere: existence and non-existence. This grasping and adhering is either supported by existence or supported by non-existence. Suppose one is without this grasping, not grasping at a mental realm which causes suffering, not dwelling, and not discerning a self. When suffering arises, it arises, and when suffering ends, it ends. He regards these without doubt and without confusion, and then without these, he has self-realization. This is called right view, and what the Tathāgata establishes as right view.
“Why is this so? One who sees arising of the world, is not one who holds to its non-existence. One who sees cessation of the world, is not one who holds to its existence. This is spoken of as ‘freedom from the Two Extremes,’ which is called the Middle Way. That is, that this existence is the cause of that existence, and this arising is the cause of that arising. These are caused by ignorance, including even the entire arising of the pure mass of suffering. When ignorance ends, then from this comes the end of such actions, including even the end of the pure mass of suffering.”
After the Buddha had spoken this sūtra, then Venerable Kātyāyana Gotra heard what the Buddha had said. Not giving rise to outflows, his mind obtained liberation, and he attained arhatship.