ODT Track Changes: how do we represent a delete across element boundaries?
| Poster | Content | ||
|---|---|---|---|
nk4um Administrator Posts: 35 | I am pleased that I am the first to spot the deliberate mistake in my post above - this is not a split but a merge! It was late in the afternoon... The respresentation is correct if delta:merge can only merge elements of the same type. This raises the issue about whether we should be able to merge elements of two different types. However, the syntax for delta:merge is in fact perfectly capable of allowing merge of two different element types, assuming that the final version of the enclosing element is the same as the first element, i.e. merging an <h> followed by a <p> always results in an <h>. Therefore we could represent the merge described above in the following way:
This is a much neater representation than the one in the previous post. I think we can extend the definition of merge to allow this, without any ambiguity. Unfortunately this would lose the symmetry between delta:split and delta:merge as delta:split is only allowed to split an element into two elements of the same type. I think this can be solved also as follows: The current rule for split is, "The first part of the split element is the preceding sibling element of the same type ignoring any elements that have been added in the same or a later CT". If we remove "of the same type" then we restore the symmetry with merge and allow different types of element to be merged and split. To summarise, this example suggests updates to the spec as follows: - merge can merge elements of different types - split can split an element into two elements which have differen types Please do comment on this suggestion. | ||
nk4um Administrator Posts: 35 | Ganesh Paramasivam:
Robin La Fontaine: You can only split an element of the same type, so this could not be used here. So this would be represented as:
It does not look very pretty, but it works! If the split element could split into elements of different types, then it could be used here, but it would make the split element more complex. I do not think this example is a very common edit, but if it is then perhaps we need to consider a more elegant representation. |
