add attr, doctypes, nesting and variables