source: branches/mvc/Base/HTML/XHTML.php

Last change on this file was 47, checked in by chronos, 10 years ago
  • Odstraněno: Zbytečná PHP ukončovací značka "?>" z konce všech souborů.
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1<?php
2
3include_once(dirname(__FILE__).'/../XML.php');
4
5class XHTMLDocument extends XMLDocument
6{
7 var $HeadTag;
8 var $BodyTag;
9 var $TitleTag;
10
11 function __construct()
12 {
13 parent::__construct();
14 $this->HeadTag = new XMLTag('head');
15 $this->TitleTag = new XMLTag('title');
16 $this->TitleTag->SubElements = '';
17 $ContentType = new XMLTag('meta');
18 $ContentType->Attributes = array('http-equiv' => 'content-type', 'content' => 'application/xhtml+xml; charset='.$this->Encoding);
19 $this->HeadTag->SubElements = array($this->TitleTag, $ContentType);
20 $this->BodyTag = new XMLTag('body');
21 }
22
23 function GetOutput()
24 {
25 $HTML = new XMLTag('html');
26 $HTML->Attributes = array('xmlns' => 'http://www.w3.org/1999/xhtml',
27 'xml:lang' => 'cs');
28 $HTML->SubElements = array($this->HeadTag, $this->BodyTag);
29 $DOCTYPE = new XMLTag('!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"');
30 $DOCTYPE->EndSymbol = '';
31 $this->Content = new XMLTag();
32 $this->Content->SubElements = array($DOCTYPE, $HTML);
33 return(parent::GetOutput());
34 }
35}
Note: See TracBrowser for help on using the repository browser.