NOTE: This issue has been solved.
I don't know how the container.xml error popped up in the first place, but when I was first trying to fix the problem, I created a file named container.xml or container.xhmtl in the Text files folder, which I later forgot about. I simply created a new epub and imported all my files EXCEPT that one. I no longer get an error message and, even better, there's no longer a container.xml file anywhere in my epub.
* * * * *
One of my epubs got zapped somehow. It no longer displayed a cover image, and I couldn't open it in iBooks. I traced the problem to a file I never even knew existed - container.xml.
I thought I had fixed it by simply creating a new container.xml file, but that just created a new problem(s).
So I created a brand new epub and imported my text files, style sheets and images from the original.
When I validate it, I got a warning that container.xml should have the extension .xhtml. I changed it to .xhtml, but that only spawned a new error. From the pages I've Googled, it looks like it's supposed to have the extension .xml, so I changed it back.
I now get a warning that container.xml should be container.xhtml, followed by the following error:
Error Code RSC-005:
Error while parsing file 'element "container" not allowed here; expected the element end-tag, text or element "ns1:switch"... (etc., etc.)
The error is on line 8, which is the second line below...
<meta name="Sigil version" content="0.9.8" />
<meta name="cover" content="cover.jpg" />
<meta property="dcterms:modified">2017-06-10T17:40:25Z</meta>
I noticed that the third line listed above ends with...
</meta>
...while the other two lines end with...
/>
So I fiddled with that but didn't fix anything.
Does anyone know what the solution is?
I'm also still trying to figure out why container.xml even exists in this project. There's no file named container.xml in my working epubs. When I create a new epub, the folder Misc is empty. So where did container.xml come from?
Is there a way to simply get rid of it? Deleting it only causes problems, but maybe there's some associated code in another file I need to delete.
Googling for "RSC-005" turned up some discussions that suggest...well, they're hard to understand. There are some suggestions that the problem is with Pagina epub checker; in other words, it may not be a valid error at all. But that still doesn't explain why container.xml even exists. Other references offer fixes for specific problems.
I'm confused!