Hi! An xhtml document should set the xml namespace in use. So I expand my code once more: if ($xhtml) { $htmlParam .= ' xmlns="http://www.w3.org/1999/xhtml"'; } $xhtml should be set for any XHTML version, Masi