5 Replies Latest reply: Oct 3, 2013 10:22 AM by MarkWilx
paulmenken Level 1 Level 1 (0 points)

I encounter a problem when exporting an epub file from Pages after the latest update in december.

 

Epubcheck Version 1.2


ERROR: sagarra-priveleven.epub/OPS/cover.xhtml(5): element "div" not allowed here; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")


Check finished with warnings or errors!

 

The file does not pass the Epubchecker

 


 



Pages, OS X Mountain Lion (10.8.2)
  • 1. Re: pages epub export
    BoBennett Level 1 Level 1 (5 points)

    I have the same problem.  It looks as if Apple's export is simply creating invalid epubs that do not meet the 3.0 standards.

  • 2. Re: pages epub export
    BoBennett Level 1 Level 1 (5 points)

    You can fix this manually if you know how to edit an epub (unzip, edit, then rezip).  Change all the "div" tags surrpounding the images to "span" tags.  This will make it pass validation and still look the same.  Of course, this is a PIA work around.  Hope someone from Apple address this soon.

  • 3. Re: pages epub export
    jeffs44 Level 1 Level 1 (0 points)

    Hi There,

     

    I also came across this issue. My epub files created by Pages always used to validate perfectly with epubcheck3.0.

     

    As I am about to publish I had a quick check this morning...horror! dozens of error messages such as these:

    "ERROR: cyw.epub/OPS/chapter-23.xhtml(5,4451): element "div" not allowed here; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")"

     

    It seems this fixes it:

    1- Open your epub using the free Sigil epub editor

    2- Save it with Sigil

     

    Rerun epubcheck validation! It indeed passed validation after this simple process.

     

    Hope it helps with you took.

     

    Take care

     

    Jeff

  • 4. Re: pages epub export
    MarkWilx Level 1 Level 1 (5 points)

    Howdy All:

     

    I thought I'd pipe in with my experiences for others finding this thread.  BoBennett, I tried your fix, but it did not work.  I replaced all occurances of "div" with "span" as you suggested.  This did not work.  I got following error:

     

    element "span" not allowed here; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")

     

     

    I also tried your solution jeffs44.  It didn't work either.  After doing as you suggested, I got the following error:

     

    element "metadata" incomplete; missing required elements "dc:language" and "dc:title"

     

    So, unfortunately, neither of these solutions work.  I expect changes were made somewhere that made the once valid solutions now invalid.  Really frustrated with Pages.

     

    Mark

  • 5. Re: pages epub export
    MarkWilx Level 1 Level 1 (5 points)

    I finally managed to get a clean ePub document export from Pages.  The solution I found was to open my Pages exported ePub file in Sigil, as jeffs44 suggested and then manually add the "dc:langauge" and "dc:title" metadata.  Then I save the file and got a clean epubcheck.

     

    Mark