Sometimes - due to manual editing, mis-copy-pasting, or tool failure - we may encounter an FODT (or ODT) with an XML element that has the same attribute defined twice. Yes, that is certainly an error; but - it is very easy to recover from, since the syntactic structure of the XML is respected. LO currently refuses to open such a file, emits an error and gives up. Instead, we should - either by user authorization or by default - try to recover from this situation and continue opening the file. The obvious recovery strategy is to let the later re-definition of the attribute override the earlier one. But - it would not be terrible if re-definitions would be ignored. As I am not much of an FODT smith, I would appreciate a minimal example of this. (Or - I could upload a very-non-minimal example.)
If this is to be implemented, then only in recovery mode, where the question will appear, and the document will arrive "recovered". No idea if it's possible/simple to tweak the XML parser (SAX) that we use, to actually implement that.
(In reply to Mike Kaganski from comment #1) > If this is to be implemented, then only in recovery mode, where the question > will appear, and the document will arrive "recovered". Sure, that's fair I guess. > No idea if it's possible/simple to tweak the XML parser (SAX) that we use, > to actually implement that. If there's no support for it - we've got a nice idea for a GSoC project or a tender that can get many bidders since it's not LO-specific.
Created attachment 201253 [details] A sample FODS