Login   Register  
PHP Classes
elePHPant
Icontem

Class: docType

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael A. Peters  >  docType  >  Download .tar.gz .zip  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: docType
Base name: doctype
Description: Create HTML or XHTML depending on the user browser
Related classes: ,
Version: 1.0
PHP version: 5.0
License: Freeware
All time users: 408 users
All time rank: 4973
Week users: 1 user
Week rank: 2503
Picture of Michael A. Peters
Author: Michael A. Peters <e-mail contact>
Packages: 6 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Age: 39
All time rank: 964126 in United States United States
Week rank: 275 Up29 Up in United States United States
Innovation award
Innovation award
Nominee: 2x


  Detailed description  
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.

 

  Groups  
Group folder image HTML HTML generation and processing View top rated classes
Group folder image XML XML parsing and generation View top rated classes
Group folder image HTTP HTTP protocol clients, headers and cookies View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes

  Rate classes User ratings   Applications   Files Files  

  Innovation Award  
PHP Programming Innovation award nominee
January 2010
Number 8
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

  User ratings  
There are not enough user ratings to display for this class.

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file content.xml Data Sample XML Content
Plain text file example.php Example Sample script
Plain text file README.php Aux. README file
Plain text file style.css Data Style Sheet
Plain text file xml_doctype.inc Class Main class file

Download all files: doctype.tar.gz doctype.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.