Interdependent change tracking, ODF proposal

Svante Schubert svante.schubert at gmail.com
Fri Jun 6 15:40:15 UTC 2025


Dear Miklos,

Thank you very much for working on this issue! Tracked changes are an area
that is still quite underdeveloped. As the feature is deeply integrated
into the core, I understand maintenance must be quite complex.
On the last OASIS ODF TC, Regina asked me to provide a status quo of the
change-tracking in ODF in general, as after a platform change former
documentation is now harder to find.

In general, the progress of change-tracking in the ODF standard depends on
the ODF implementations, such as LibreOffice.
Incremental improvements are valuable; at the same time, we should keep in
mind that our design should ultimately be scalable enough to meet all
current and foreseeable requirements. While we may not need real-time
collaboration from the beginning, it would be great to ensure that the
underlying data format can eventually support it.
At some point, we should be able to avoid transferring the entire document
with each change, or group of changes. One of the challenges we face is
that both ODF and OOXML currently embed changes within the document
structure itself. Without a proper positioning mechanism, it’s not feasible
to transmit changes independently of the full document.
To illustrate: suppose you have an ODF document in read-only mode on your
server for review, and I wish to propose a small edit—say, correcting a
typo—similar to a "pull request." In this scenario, it shouldn’t be
necessary to assign an ID to every possible element. All these explicit IDs
would unnecessarily increase the file size, and even then, we wouldn't be
able to address modifications at the level of individual characters within
text.
Of course, XPath cannot work here, as ODF XML is not available at runtime
like the DOM in a browser, allowing cross-browser scripting. But perhaps we
could consider referencing higher-level semantic entities? We might group
XML into logical "puzzles" and reference elements by their position within
these groupings. For example, in an ODT file, we could refer to the second
character in the paragraph of an image or table using a notation like
"/3/2" (or "2,1" if 0-based).
An encouraging aspect is that the semantic structures of ODF and OOXML are
quite similar, which raises the possibility of defining a common approach
across multiple—perhaps all—rich-text formats?
I have always imagined the future of change tracking as a means of
serialising real-time collaboration, useful when the internet drops out,
like when driving through a tunnel during a collaborative editing session
in a train. In such a change model, we could store a list (or branch) of
changes similar to commits, each based on patterns defined as XML changes
within the ODF XML specification. This approach would substantially reduce
complexity during live collaboration. For instance, inserting a table
column could be treated as a single, labelled change pattern that
encapsulates all atomic operations involved (adding a column at the right
position and adding a cell in every row at the right position).
To bring this back to your present proposal: consider a simple text "ABC"
where I apply a red style to "AB" and you apply bold to "BC"—a clear case
of overlapping changes. Should we aim to support such scenarios already
now, or would this be better addressed in a future, more robust design once
we’ve moved past the current workarounds?

By the way, ODFDOM of the ODF Toolkit - being the back-end of some
web-offices - already provides such a change implementation for text
formats:
<https://tdf.github.io/odftoolkit/odfdom/operations/operations.html>

Still, looking at the progress being made and from what I heard of core
developers, this is anything but an easy task - likely nothing a company
could bet its future on at this time. It could instead be a job for the
foundation, but it might be difficult to tender, or hiring one or more
developers to add this advanced cross-cutting feature, which is so
fundamentally important for the future of LibreOffice.

Kind regards,
Svante

On Wed, 21 May 2025 at 15:58, Miklos Vajna <vmiklos at collabora.com> wrote:

> Hi Regina,
>
> I recently looked at the state of change tracking in Writer when 2
> tracked changes are on top of each other, see tdf#166319.
>
> The ODF side of this is strange: e.g. delete on insert was implemented
> in openoffice times, see
> sw/source/filter/xml/XMLRedlineImportHelper.cxx:206 and core.git commit
> 52d244dee88b111631680d8cd4c8b922f9640c15 (- added: redline import,
> 2001-01-10), at the same time some other combinations didn't work
> previously.
>
> Having researched this a bit, it seems Word supports 3 combinations and
> now I fixed the ODF filter to also handle these (see commits in the TDF
> bug). The old code had no tests, but now that I added tests for the
> newer combinations, I noticed that even the schema doesn't allow this
> markup, for something that OOo wrote since 2001.
>
> Anyhow, I attach my proposal to fix this, could you please file an OASIS
> issue for this?
>
> Thanks,
>
> Miklos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20250606/26bb9f3f/attachment.htm>


More information about the LibreOffice mailing list