views:

59

answers:

1

Is it possible using PHP (I was thinking may the phpinfo file or a php.ini file) or an .htaccess file to set a doctype for an entire subdirectory?

Basically, in a nutshell, I'm using a software that uses XSL templates to output data to a set of HTML files. Modifying the xsl:output tag to include the doctype breaks the template and therefore, does not work. Just adding the doctype in the XSL file, breaks it as well.

I need the proper doctypes in place for my CSS to function properly, cross-browser. I realize that I could add the doctype to the HTML files after export but, I'm really striving to automate this process.

Any thoughts?

+1  A: 

Do you have the <xsl:output> element?

<xsl:output
method="xml|html|text|name"
version="string"
encoding="string"
omit-xml-declaration="yes|no"
standalone="yes|no"
doctype-public="string"
doctype-system="string"
cdata-section-elements="namelist"
indent="yes|no"
media-type="string"/>

Note the doctype-public="string" and doctype-system="string"

http://www.w3schools.com/xsl/el_output.asp

Ben
@Ben - What 'element' are you referring to? Here is what I had been trying to use in my template and was not working --- <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
Batfan
@Ben - Yes, the xsl:output element is being used. Like I said though, adding the doctype is not working.
Batfan