0

I had a problem with a file I never even knew existed - container.xml - which is discussed here.

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 now get 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 container.xml in my working epubs. When I create a new epub, the folder Misc is empty.

That suggests that I somehow created this file by mistake. 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. I'm confused!

  • This is the sort of error that you should never get. Your project files are in an error state caused by Sigil. I would recommend starting from scratch, creating a new project and adding a file at a time. If Sigil generates an epub file, I would validate it using this: validator.idpf.org You might want to examine some sample epub3 files to see what a valid epub file ought to look like: idpf.github.io/epub3-samples/30/samples.html Again, these are the kind of errors related to converting formats and a GUI tool messing up. It's best to begin from scratch. – idiotprogrammer Jun 11 '17 at 20:55
  • maybe container.xml contains a still open tag -- perhaps around the CONTAINER element? I don't think the code you are pasting here are included in container.xml . Inside container.xml there is a <container> element which must be closed. – idiotprogrammer Jun 11 '17 at 21:08
  • I started from scratch, as you suggested. I discovered a folder named container.xml or container.xhtml in the Text files folder that I had created when first trying to fix the error. I simply imported all the files except that one and it works fine now. There doesn't appear to be a container.xml file anywhere in my epub. – WordBear Jun 11 '17 at 21:53
  • You need to show more of the XML as those 3 lines are correct so the issue is probably before that. Tghe meta tags are correct – user151019 Jun 13 '17 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.