kdom and khtml integration

Andras Mantia amantia at kde.org
Sun Mar 5 16:54:58 GMT 2006


Nikolas Zimmermann wrote:

> On Sunday 05 March 2006 17:04, Andras Mantia wrote:
>> Nikolas Zimmermann wrote:
>> >  There won't be a KDOM
>> > in kdelibs at all - we will integrate within khtml.
>>
>> So there will not be any DOM implementation that can be used by other
>> apps and it will be integrated the same way as the current DOM
>> implementation is with KHTML?
>>
>> Andras
> 
> Hi Andras,
> 
> that's not correct this way :-) We will offer new interfaces (basically
> stuff like KDOMParser/KDOMDocumentBuilder) to build DOM trees
> ie. from some remote url or local file (KIO), from in-memory buffers etc.
> 
> That means, you don't need to have a KHTMLPart loaded at all, but
> can directly use the "future khtml" (after the kdom integration)
> to just use the DOM stuff (for example: w/o any rendering involved)
> 
> After my last exam Monday, I want to start working on these things
> ASAP, so I can actually show code which demonstrates how the
> new "khtml" should/will work in future.
> 
> Hope that clarifies the situation a bit.  :-)

A little. In short, we want to have in Quanta a common DOM tree for source
and VPL (WYSIWYG) mode. Right now we have our own tree and there is the
KHTML DOM tree. This requires intensive synchronization between the two
whenever the document is modified in source or VPL mode. With KDOM we
wanted to solve this problem, and can you tell me if this will be possible?
What I was thinking is:
- parse the document with our own parser and create a KDOM based tree
- the KDOM tree nodes must be extensible (they should be able to hold extra
information)
- KHTML should be able to render directly this KDOM tree (for VPL mode)
- it should be possible to modify the tree from code, without regenerating
from scratch

Now if all the above will be possible even with this monolithic design, I'm
fine with it. Like Paulo said, we just want to have a KHTML and the
underlying DOM tree which will make developing WYSIWYG application easier,
without requiring extensive and ugly hacks.

Andras

-- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org






More information about the kfm-devel mailing list