Skip navigation

HT4168: Creating ePub files with Pages

Learn about Creating ePub files with Pages

HT4168 pages epub export

1382 Views 5 Replies Latest reply: Oct 3, 2013 10:22 AM by MarkWilx RSS
paulmenken Calculating status...
Currently Being Moderated
Dec 7, 2012 12:56 AM

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)
  • BoBennett Calculating status...
    Currently Being Moderated
    Dec 12, 2012 7:07 AM (in response to paulmenken)

    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.

  • BoBennett Level 1 Level 1 (5 points)
    Currently Being Moderated
    Dec 12, 2012 7:21 AM (in response to paulmenken)

    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.

  • jeffs44 Calculating status...
    Currently Being Moderated
    Dec 28, 2012 10:49 PM (in response to paulmenken)

    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

  • MarkWilx Level 1 Level 1 (5 points)
    Currently Being Moderated
    Oct 3, 2013 9:57 AM (in response to BoBennett)

    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

  • MarkWilx Level 1 Level 1 (5 points)
    Currently Being Moderated
    Oct 3, 2013 10:22 AM (in response to MarkWilx)

    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

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.