Edit report at https://bugs.php.net/bug.php?id=60224&edit=1
ID: 60224
Updated by: cmb@php.net
Reported by: indy at spikehead dot co dot uk
Summary: div nesting in html docs
-Status: Open
+Status: Analyzed
Type: Bug
Package: Doc Build problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
PhD renders <para> as <p> instead of the appropriate <div> (or
maybe <section>). This cannot be easily changed, because the docs
use <para> all the time, albeit <simpara> would be more
appropriate.
Previous Comments:
------------------------------------------------------------------------
[2011-11-05 13:50:14] indy at spikehead dot co dot uk
Description:
------------
I've been looking at the "alpha" or "beta" epub docs (depending what you
call them). These are failing on my ereader, and after pushing the epub through a validator, there
are a lot element errors. These are present on the HTML pages as well.
Basically these are all nested elements (div, ul, p) within a P tag (which you can't do). The
code snippet below is from the "What is PHP page". Around half of the occurances are this
simple and the enclosing p tag removed.
There are a lot of others where there are several instances of incorrect nesting in a paragraph,
which need the closing p tag moving to the correct location.
Test script:
---------------
<p class="para">
<div class="example" id="example-1">
<div class="info"><p><b>Example #1 An introductory
example</b></p></div>
<div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br
/> "http://www.w3.org/TR/html4/loose.dtd"><br
/><html><br
/> <head><br
/> <title>Example</title><br
/> </head><br
/> <body><br /><br
/> <span
style="color: #0000BB"><?php<br
/> </span><span
style="color: #007700">echo </span><span style="color:
#DD0000">"Hi, I'm a PHP script!"</span><span
style="color: #007700">;<br
/> </span><span
style="color: #0000BB">?><br /></span><br
/> </body><br
/></html></span>
</code></div>
</div>
</div>
</p>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60224&edit=1