Kid always produces valid XML, so you don't have to worry about invalid output.
Kid's py:content, py:strip, and py:replace are designed to enable you to add dynamic content to your page. You can also use the ${} syntax to drop strings into your page.
Kid provides the py:if, py:for, and py:def processing directives to control program flow and make reuse possible.
The py:match processing directive makes it possible to add dynamic content to templates in an XML-specific way that allows for all kinds of powerful transformations.
The py:extends directive allows you to keep reusable named template functions (py:def) and match templates in a central location to be "inherited" by multiple templates.