Omit attribute values if empty when serializing to HTML