Using XHTML with Cocoon is sometimes a little frustrating. It seems that by using the default XHTML serializer configuration located on the Cocoon Wiki your rendered page is not valid XHTML. While taking a closer look at the configuration (see below) you will notice that it uses the XMLSerializer as its source.