xml and html5 templates compliance:
1. added 'data-' prefix to attributes
2. replaced '&', '<' with XML entities &amp; &lt;
3. added "" value to attributes without value