cvs: phd /formats xhtml.php

From: Date: Tue, 11 Nov 2008 19:59:26 +0000
Subject: cvs: phd /formats xhtml.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2505@lists.php.net to get a copy of this message
bjori Tue Nov 11 19:59:26 2008 UTC Modified files: /phd/formats xhtml.php Log: Add support for the numeration attribute for orderedlist http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.76&r2=1.77&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.76 phd/formats/xhtml.php:1.77 --- phd/formats/xhtml.php:1.76 Mon Nov 10 09:49:55 2008 +++ phd/formats/xhtml.php Tue Nov 11 19:59:26 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.76 2008/11/10 09:49:55 nilgun Exp $ */ +/* $Id: xhtml.php,v 1.77 2008/11/11 19:59:26 bjori Exp $ */ class XHTMLPhDFormat extends PhDFormat { protected $elementmap = array( /* {{{ */ @@ -1224,7 +1224,24 @@ public function format_orderedlist($open, $name, $attrs, $props) { if ($open) { - return $this->escapePara() . '<ol>'; + $numeration = "1"; + if (isset($attrs[PhDReader::XMLNS_DOCBOOK]["numeration"])) { + switch($attrs[PhDReader::XMLNS_DOCBOOK]["numeration"]) { + case "upperalpha": + $numeration = "A"; + break; + case "loweralpha": + $numeration = "a"; + break; + case "upperroman": + $numeration = "I"; + break; + case "lowerroman": + $numeration = "i"; + break; + } + } + return $this->escapePara(). '<ol type="' .$numeration. '">'; } return '</ol>' . $this->restorePara(); }

« previous php.doc.cvs (#2505) next »