XSLT prob with Doctype
I am transforming XHTML to XHTML using XSLT and Doctype part is giving me 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">
and this is not valid xml, according to IE8, FF3. Is there any way to prevent generating DOCType, xmlns from php engine? Or is there any way to make XSLT ignore DOCTYPE and xmlns?
It's likely that the DOCTYPE is fine but your XML is invalid. Run it through The Validator.
XML document is fine, but it is not XHTML compliant(paragraph is embedded in font tag etc...), therefore with presense of DocType, the the validation fails and XSLT doesn't run properly. Therefore if i remove DocType, the XSLT transformation succeeds. Therefore, i need either php engine not to generate the doctype declaration or XSLT to ignore it.
Or you need to be generating a valid document.
The document is generated by php code, which is a kind of big,legacy system, and i don't have much control over it.
I feel your pain but you're just going to have to go in there and fix the PHP. One of the fundamental principals of XML is that all things are supposed to stop when something is invalid or not well formed.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread