Generate XHTML using the new configuration

* Initial tests and an implementation using reflection

Change-Id: I7403dbd22bfe5e0600aa8f9f9eac008a41b2892a