Quote:
Originally Posted by user_none
Any XML file missing the XML header is rewritten automatically and it results in a blank file.
|
I'm unsure what you mean by that. A file that's missing the XML header is not an XML file, so I'm taking wild guesses:
- Any file that "somewhat resembles" an XML file but lacks the header gets rewritten
- Any file that is linked from the NCX and which should be XML but isn't, gets rewritten
- Any file that lacks the XML header is rewritten
Since we know that Sigil leaves other non-XML files alone (e.g. JPEGs), I assume it's one of the other two. I must admit I haven't looked at the code yet, but I'd be curious which conditions trigger that behaviour.
The more I think about it, the more it makes sense to me to either just mark files as invalid/display an error, or to send them through some kind of XML sanitizer (like
TagSoup/Tagger).