PHP Classes
elePHPant
Icontem

docType: Create HTML or XHTML depending on the user browser

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-02-18 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 446 All time: 5,897 This week: 949Up
Version License PHP version Categories
doctype 1.0Freeware5.0HTML, XML, HTTP, PHP 5
Description Author

This class can be used to create HTML or XHTML depending on the user browser.

It analyzes the current HTTP request Accept header and depending on whether the browser accepts XHTML documents or not, it creates a DOM document structure with the right DOCType element for XHTML or not.

The rest of the document structure can be composed with other regular calls to DOM object functions.

Innovation Award
PHP Programming Innovation award nominee
January 2010
Number 8


Prize: One book of choice by Manning
XHTML is standard for defining HTML documents compliant with XML standards.

Web sites may serve their pages in XHTML if the underlying browser supports it.

This class can detect automatically whether the current user browser supports XHTML documents. It serves HTML pages with the correct DOCTYPE and tag structure depending on whether XHTML is supported or not.

Manuel Lemos
Picture of Michael A. Peters
Name: Michael A. Peters <contact>
Classes: 6 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file content.xml Data Sample XML Content
Accessible without login Plain text file example.php Example Sample script
Accessible without login Plain text file README.php Aux. README file
Accessible without login Plain text file style.css Data Style Sheet
Plain text file xml_doctype.inc Class Main class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:446
This week:0
All time:5,897
This week:949Up