Set attributes on the document element, so that searches work.