-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement simplelist attributes (#96)
Co-authored-by: haszi <haszika80@gmail.com> Co-authored-by: Gina Peter Banyard <girgias@php.net>
- Loading branch information
1 parent
45cffd6
commit 5362fde
Showing
8 changed files
with
298 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,3 @@ public function execute(Reader $r) { /* {{{ */ | |
} /* }}} */ | ||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<chapter xml:id="simpelist" xmlns="http://docbook.org/ns/docbook"> | ||
|
||
<section> | ||
<para>1. Simplelist with no type</para> | ||
<simplelist> | ||
<member>First</member> | ||
<member>Second</member> | ||
<member>Third</member> | ||
<member>Fourth</member> | ||
<member>Fifth</member> | ||
<member>Sixth</member> | ||
<member>Seventh</member> | ||
</simplelist> | ||
</section> | ||
|
||
<section> | ||
<para>2. Simplelist with "inline" type</para> | ||
<simplelist type="inline"> | ||
<member>First</member> | ||
<member>Second</member> | ||
<member>Third</member> | ||
<member>Fourth</member> | ||
<member>Fifth</member> | ||
<member>Sixth</member> | ||
<member>Seventh</member> | ||
</simplelist> | ||
</section> | ||
|
||
<section> | ||
<para>3. Simplelist with "vert" type, 3 columns</para> | ||
<simplelist type="vert" columns="3"> | ||
<member>First</member> | ||
<member>Second</member> | ||
<member>Third</member> | ||
<member>Fourth</member> | ||
<member>Fifth</member> | ||
<member>Sixth</member> | ||
<member>Seventh</member> | ||
</simplelist> | ||
</section> | ||
|
||
<section> | ||
<para>4. Simplelist with "horiz" type, 4 columns</para> | ||
<simplelist type="horiz" columns="4"> | ||
<member>First</member> | ||
<member>Second</member> | ||
<member>Third</member> | ||
<member>Fourth</member> | ||
<member>Fifth</member> | ||
<member>Sixth</member> | ||
<member>Seventh</member> | ||
</simplelist> | ||
</section> | ||
|
||
</chapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--TEST-- | ||
Simplelist rendering 001 - Types and columns | ||
--FILE-- | ||
<?php | ||
namespace phpdotnet\phd; | ||
|
||
require_once __DIR__ . "/../setup.php"; | ||
require_once __DIR__ . "/TestChunkedXHTML.php"; | ||
|
||
$formatclass = "TestChunkedXHTML"; | ||
$xml_file = __DIR__ . "/data/simplelist.xml"; | ||
|
||
$opts = array( | ||
"index" => true, | ||
"xml_root" => dirname($xml_file), | ||
"xml_file" => $xml_file, | ||
"output_dir" => __DIR__ . "/output/", | ||
); | ||
|
||
$extra = array( | ||
"lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", | ||
"phpweb_version_filename" => dirname($xml_file) . '/version.xml', | ||
"phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', | ||
); | ||
|
||
$render = new TestRender($formatclass, $opts, $extra); | ||
|
||
if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { | ||
mkdir($opts["output_dir"], 0755); | ||
} | ||
|
||
$render->run(); | ||
?> | ||
--EXPECTF-- | ||
Filename: simpelist.html | ||
Content: | ||
<div id="simpelist" class="chapter"> | ||
|
||
<div class="section"> | ||
<p class="para">1. Simplelist with no type</p> | ||
<ul class="simplelist"> | ||
<li>First</li> | ||
<li>Second</li> | ||
<li>Third</li> | ||
<li>Fourth</li> | ||
<li>Fifth</li> | ||
<li>Sixth</li> | ||
<li>Seventh</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="section"> | ||
<p class="para">2. Simplelist with "inline" type</p> | ||
<span class="simplelist">First, Second, Third, Fourth, Fifth, Sixth, Seventh</span> | ||
</div> | ||
|
||
<div class="section"> | ||
<p class="para">3. Simplelist with "vert" type, 3 columns</p> | ||
<table class="simplelist"> | ||
<tbody> | ||
<tr> | ||
<td>First</td> | ||
<td>Fourth</td> | ||
<td>Seventh</td> | ||
</tr> | ||
<tr> | ||
<td>Second</td> | ||
<td>Fifth</td> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<td>Third</td> | ||
<td>Sixth</td> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<div class="section"> | ||
<p class="para">4. Simplelist with "horiz" type, 4 columns</p> | ||
<table class="simplelist"> | ||
<tbody> | ||
<tr> | ||
<td>First</td> | ||
<td>Second</td> | ||
<td>Third</td> | ||
<td>Fourth</td> | ||
</tr> | ||
<tr> | ||
<td>Fifth</td> | ||
<td>Sixth</td> | ||
<td>Seventh</td> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters