EPub Error Message in Validation

I created an EPub EBook in Scrivener and was able to view it in Adobe Digital Editions 4.0 with no problem. However, when I uploaded my file to IngramSpark, I received this error message:

[ERROR]OPS/body9.xhtml: 25,65: attribute “align” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”

The same message appears in EPub Validator.

How do I troubleshoot this problem? This is my first EPub attempt.

Stephen

These error messages are usually only half of the puzzle, you need to look at the ePub itself in the described location to see what might be going on. In the error message, we are told the problem is in a file called ‘body9.xhtml’, on line 25, column 65. If you open the ePub in an editor like Calibre or Sigil you should be able to get to that spot with the code editor pretty easily. It’s difficult for me to tell you precisely what happened without knowing what the messed up code looks like. If you know your way around HTML, you might be able to fix it easily by just removing the offending align attribute.

I would also speculate that since the first file that has this problem is the 9th content file Scrivener created, it’s unlikely a repeating issue and rather something specific to the content in that area. You’ll also be able to figure that out once you have the ePub internals opened up. Then you can go back to the relevant text in Scrivener, around the place where the malfunction occurred, and see if there is anything unusual (in reference to the book’s typical formatting) in the text formatting.

Ioa:

Thank you for the prompt response.

I downloaded Sigil and examined both the source code and the Scrivener file at that location.

The reference at file 9, line 25, column 65 is a black between these two lines of code:

Hace pocos años en la competencia global entre corredores de maratón, los etíopes reinaban.

Los corredores keniatas tenían talento, pero los etíopes entrenaban mejor y estaban mejor preparados. El entrenar a gran altura aumentó sus fuerzas; el entrenar como un equipo aumentó su competitividad.

The text in question is:

Hace pocos años en la competencia global entre corredores de maratón, los etíopes reinaban.
Los corredores keniatas tenían talento, pero los etíopes entrenaban mejor y estaban mejor preparados.

I am not seeing anything particularly unusual, although my book is written in Spanish.

Stephen

Interesting, I don’t see any alignment requests in that code. The line/col number thing can be a little inaccurate I’ve found. What you might try is searching for align= in code mode within Sigil for that body9.xhtml file and see if it is attached to an invalid element like span.