Home » XML » XML_HTMLSax3 » Bug #1850
HTMLtoXHTML.php does not produce XHTML
Details
| Submitted | 2004-07-12 07:14 UTC |
|---|---|
| From | ignatius dot reilly at free dot fr |
| Assigned | dufuz |
| Status | Closed |
| Package | XML_HTMLSax3 |
| PHP Version | 4.3.7 |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-07-12 07:14 UTC] ignatius dot reilly at free dot fr
Description:
------------
I tried to run the HTMLtoXHTML.php example, without success, except on the simplest XML fragments.
Reproduce code:
---------------
For example:
the page http://www.auderghem-analytica.com/main/en/sect1/p100
is XHTML
However, the script returns NOT XHTML.
Problems with empty tags: <img>, <input> which apparently are not "closed" by the parser.
Expected result:
----------------
For example, one would expect:
<img src="/images/aa/layout/spacer.gif" width="1" height="1" />
Actual result:
--------------
But one gets:
<img src="/images/aa/layout/spacer.gif" width="1" height="1">
[2005-02-22 11:26 UTC] b dot clot at adverline dot com
Hi,
In fact the bug seems related to the fact that HTMLSax3, at least in its latest release, doesn't detect self-closing tags and therefore tries to close them... Is a fix considered?
Thanks,
Benjamin.
[2006-04-14 19:45 UTC] edwardzyang at thewritingpot dot com
HTMLtoXHTML.php really is just a proof of concept, I don't think by any means it was meant to be comprehensive. Besides not closing self-closing tags, it also doesn't check the nesting of tags or the attributes.