[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: Enable the modification of KoXml DOM tree
From:       Jos van den Oever <Jos.van.den.Oever () kogmbh ! com>
Date:       2010-03-01 11:04:42
Message-ID: 201003011204.42337.Jos.van.den.Oever () kogmbh ! com
[Download RAW message or body]

On Saturday 27 February 2010 07:16:40 Ganesh Paramasivam wrote:
> > On 2010-02-27 04:56:52, Thorsten Zachmann wrote:
> > > Can you please explain why you need to modify the document while you
> > > are loading it?
> > > 
> > > Please note that modifying is not possible as the document is const
> > > during loading.
> > > 
> > > I personally think that modifying of the document during the loading
> > > should be avoided.
> 
> This is due to the approach taken by ODF spec for storing delete changes.
> Deleted changes in a document are stored separately in a <text:deletion>
> tag and a <change change-id=""> is placed at the location of deletion. ODF
> specifies the following rules to the used for loading delete changes
> 
> To reconstruct the text before a deletion took place:
> -If the change mark is inside a paragraph, insert the text content of the
> <text:deletion> element as if the beginning <text:p> and final </text:p>
> tags were missing. -If the change mark is inside a heading, proceed as
> above, except adapt the end tags to match their new counterparts.
> -Otherwise, copy the text content of the <text:deletion> element in place
> of the change mark.
> 
> As you can see, these rules actually imply a modification of the DOM. We
> already have a working code for loading delete changes which does not
> require a write-able DOM tree. But the code would be a lot more cleaner
> with a write-able one. Hence this change.

Could you achieve the same functionality by using a local copy of the affected 
nodes or a dom wrapper?

Cheers,
Jos

-- 
Jos van den Oever, software architect
+49 391 25 19 15 53
http://kogmbh.com/legal/
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic