From koffice-devel Sun Mar 28 18:03:33 2010 From: Thomas Zander Date: Sun, 28 Mar 2010 18:03:33 +0000 To: koffice-devel Subject: Re: Fwd: Change Tracking of Lists - Storing delete fragments Message-Id: <201003282003.34532.zander () kde ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=126980028919836 On Friday 26. March 2010 05.57.41 Ganesh Paramasivam wrote: > Forwarding this here for future reference. > > - Ganesh > > ---------- Forwarded message ---------- > From: Ganesh Paramasivam > Date: Fri, Mar 26, 2010 at 10:25 AM > Subject: Change Tracking of Lists - Storing delete fragments > To: office-comment@lists.oasis-open.org > > > Hi, > > I'm currently implementing ODF change tracking in KWord, and there > doesn't seem to be a way to store delete changes in lists in a ODF > complaint way for some scenarios. For example, if we have a list like > this > > 1. This is a list-item-1 > 2. This is a list-item-2 > 3. This is a list-item-3 > 4. This is a list-item-4 > > And we delete the second-half of the first list-item and the first > half of the second list-item > > 1. This is a list-item-1 > ----------------- > 2. This is a list-item-2 > ------------- > 3. This is a list-item-3 > 4. This is a list-item-4 > > If I were to follow the ODF delete change loading rules, we should > have a delete fragment which looks like this > >

a list-item-1

This is a

> > However, such a fragment would result in a invalid XML file and > consequently an invalid ODF File. > > The KWord approach to solving this problem is that we store the delete > fragment like this > >

a > list-item-1

This is a
> > and use the RDF metadata to specify that "list1" and "list-item-1" are > not to be considered as a valid list and list-item respectively. So > while loading this delete-change, on encountering a list or a > list-item, we check whether it is a valid list or list-item and if > they are not valid we merge the delete change into the current list > and list-item respectively. This solution is very robust in handling > any type of list-delete changes ( There are multiple other scenarios > with similar problems that I haven't illustrated in this mail ). > > We would like to see this problem addressed in the spec, so that we > can have a inter-operable way to do this. Would this usecase be easier to solve using elements? Ideally KOffice has to start writing those out again some day for usecases where its shorter than the list+listitem construct. -- Thomas Zander _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel