View Single Post
Old 10-28-2011, 04:14 PM   #8
daubnet
Member
daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.
 
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
Quote:
Originally Posted by user_none View Post
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).
daubnet is offline   Reply With Quote