Yahya related to me from Malik from Yahya ibn Said from Wafid ibnAmr ibn Said ibn Muadh from Nafi ibn Jubayr ibn Mutim from Masud ibnal-Hakam from AIi ibn Abi Talib that the Messenger of Allah, may Allahbless him and grant him peace, used to stand up when a funeralprocession passed by, and then sit down again afterwards.
USC-MSA web (English) reference: Book 16, Hadith 33
Arabic reference: Book 16, Hadith 555