def whitespace_delete_leading(self, tk):
            """ Returns True, if no next token or all empty (up to next end element)"""
            if (
                self.formatter.correct
                and tk.leading
                and not tk.preserve
                and not tk.cdata_section
            ):
                for itk in self.sequence(tk, "EndElement"):
                    if itk.trailing:
                        return True
                    elif itk.name in ["EndElement", "CharacterData", "EndCdataSection"]:
                        return False
                return True
            return False