#NEWLINE# def collectElementChain( self , chain , hRoot , hElem ) : #NEWLINE# #INDENT# if ( ( hElem is None ) or DOM . compare ( hElem , hRoot ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . collectElementChain ( chain , hRoot , DOM . getParent ( hElem ) ) #NEWLINE# chain . append ( hElem )