dongzanghong4379 2010-04-23 20:09
浏览 65
已采纳

设置全局文档类型

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条回答 默认 最新

  • duanlu6114 2010-04-23 20:25
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度