I have heard he was both,but first a Shaolin Chan Buddist Monk,then after the temple burned he retired to a daoist temple.Even though there have been drawings of him in daoist robes the Monks that passed on his art were Shaolin.Maybe it was a cool place for him to hang out in his old age?,maybe the robes felt good and silkie?I don't know,I wasen't there,Chinese history is so full of folklore its hard to put a finger on it,My Bai Mai Sifu says he was Shaolin,other Bai Mai schools say he was daoist,will the real Bai Mei please stand up?,love to hear some feedback from other Bai Mai/Bak Mai/Pak Mai schools,my mind is open