xhtml: recognise dialog and main tags