Add support for XHTML.

This pull request adds the support for XHTML environment.