Documentation is available at xhtml.php
- <?
- /* Line Break. do i need to say anymore?*/
- class newline extends xml_element
- {
- function newline()
- {
- $this->xml_element("br");
- }
- }
- /* Hr tag*/
- class hline extends xml_element
- {
- function hline($width="100%")
- {
- $this->xml_element("hr",array("width" => $width));
- }
- }
- class head extends xml_element
- {
- function head($content="",$headnum,$attribs=array())
- {
- $headnum = (int) $headnum;
- $this->xml_element("h".$headnum,$attribs);
- $this->add_child($content);
- }
- }
- class section_element extends xml_element
- {
- function section_element($content="",$attribs=array())
- {
- $this->xml_element($this->tag,$attribs);
- $this->add_child($content);
- }
- }
- class para extends section_element
- {
- var $tag="p";
- }
- class div extends section_element
- {
- var $tag="div";
- }
- class caption extends section_element
- {
- var $tag="caption";
- }
- /* Images*/
- class image extends xml_element
- {
- var $alt;
- function image($url,$alt,$x="auto",$y="auto")
- {
- if ($alt=="") $alt=$url;
- $this->xml_element("img",array("src" => $url,"alt" => $alt));
- /* This is an experimental code to figure out width/height automaticly */
- if ($x=="auto"|$y=="auto")
- {
- $img=GetImageSize($url);
- if ($x=="auto") $x=$img[0];
- if ($y=="auto") $y=$img[1];
- }
- /* I tried doing width and height using styles, but IE 5.0 didn't like
- * it, and NS 4.5 made a total mess with CSS enabled, So until
- * Mozilla 1.0/Konqueror become usable and stable, i'll have to give
- * up on this issue */
- if ($x!="auto") $this->add_attribs(array("width" => $x));
- if ($y!="auto") $this->add_attribs(array("height" => $y));
- }
- }
- /* We want links, dont we?*/
- class href extends xml_element
- {
- function href($url,$desc)
- {
- $this->xml_element("a",array("href" => $url));
- $this->add_child($desc);
- }
- }
Documentation generated on Tue, 24 May 2005 03:59:15 -0400 by phpDocumentor 1.3.0RC3