Doctype PHP issue with XSLT

I am converting XHTML to XHTML using XSLT and the Doctype part is giving me a problem

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="LimeSurvey.xslt"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
...
</html>

      

and this is not a valid xml, according to IE8, FF3. Is there a way to prevent DOCType, xmlns from being generated from php engine? Or is there a way to make XSLT ignore DOCTYPE and xmlns?

Thanks, Ebe

0


a source to share


2 answers


You will need to insert the DOCTYPE into the CDATA block as shown here.



0


a source


Ok, that was 7 years ago, so now HTML 5:

<xsl:output doctype-public="html" />

      



gives the required html 5 output ...

0


a source







All Articles