PHP Classes

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    
Ratings Unique User Downloads Download Rankings
StarStar 33%Total: 453 This week: 1All time: 6,149 This week: 560Up
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
Age: 51
All time rank: 882117 in United States United States
Week rank: 411 Up48 in United States United States Up
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:453
This week:1
All time:6,149
This week:560Up
 User Ratings  
 
 All time
Utility:41%StarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:33%StarStar
Rank:4159