don't render end tag for self-closing elements; add support for element namespace