Better error handling in XML
Zack Rusin
zack at kde.org
Wed May 26 18:41:53 BST 2004
Ave,
this patch improves handling of xml documents. here's what happens:
- many xml documents contain html elements for which we have defined
behavior. Example of that is "p". Now on the web we have a lot of
standards non-conforming documents which enclose block elements in p.
Example of that is code like "<body>...<p><ul>...</ul></p>...</body>".
And there's quite a few pages doing that. One of many examples
includes:
http://www.mozilla.org/docs/dom/samples/treewalkerdemo.xml
As you can see that site isn't rendering at all currently.
This patch makes it render fine.
All we do is we try to attach the new node not only to the node it's
enclosed within, but also to it's parent (which means that in the
example above ul would be a child of body). For all xml documents I've
seen that was enough to get it to render correctly.
Zack
--
job Placement, n.: Telling your boss what he can do with your job.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: khtml_stack.diff
Type: text/x-diff
Size: 8320 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040526/259e0952/attachment.diff>
More information about the kfm-devel
mailing list