View Full Version : epubcheck: attribute "page-map" not allowed here error message


Doitsu
10-22-2011, 01:27 PM
I experimented with Adobe's pagemap extension and created a small test epub based on the information in the Mobileread Wiki (http://wiki.mobileread.com/wiki/Adobe_Digital_Editions). The page numbers display fine in ADE, but ADE tells me that "The document appears to have minor errors that might cause it to be displayed incorrectly" and when I tested the epub with the online EPUB validator and I got only the following error message:

ERROR: test.epub/OEBPS/content.opf(21): attribute "page-map" not allowed here; expected attribute "id" or "toc"

The corresponding line in content.opf is:

<spine page-map="map" toc="ncx">

and map has been defined in content.opf as:

<item id="map" href="page-map.xml" media-type="application/oebps-page-map+xml"/>

I know that "page-map" is an Adobe specific proprietary extension and I'm therefore not completely surprised that epubcheck reported an error, however, what puzzles me is that ADE reports an error, too. After all, ADE is an Adobe product and shouldn't have any problems with Adobe's own ePub extensions.

I wondering if it's possible to create epubs with hard-coded page numbers that will pass epubcheck?

Jellby
10-23-2011, 04:27 AM
Are you sure the "minor errors" are related to the page-map? They could be anywhere else.

Doitsu
10-23-2011, 04:59 AM
Are you sure the "minor errors" are related to the page-map?

Yes. I created the page-map based on the information in the Wiki, all page numbers appear exactly where they should be and epbucheck reported no other errors whatsoever.

Can anybody point me to a page-map based sample epub that'll pass epubcheck or can there be no such thing?

Jellby
10-23-2011, 08:25 AM
Can anybody point me to a page-map based sample epub that'll pass epubcheck or can there be no such thing?

As far as I know, there can't be, because using a page-map means adding a keyword that is not allowed by the spec. Non-ADE readers will probably just ignore it, though.

Yes. I created the page-map based on the information in the Wiki

I mean that maybe when ADE complains about the "minor errors", they are not in the page-map, but somewhere else.

Doitsu
10-24-2011, 05:22 PM
I mean that maybe when ADE complains about the "minor errors", they are not in the page-map, but somewhere else.

You were right. Through trial and error I found out that there was a drop caps style that ADE didn't like:

p.newsectioninitial:first-letter {
font-size:161.8%;
font-weight: bold;
}


After deleting this style, which didn't work anyway, the "minor errors" message was no longer displayed.

JSWolf
10-27-2011, 09:51 PM
You were right. Through trial and error I found out that there was a drop caps style that ADE didn't like:

p.newsectioninitial:first-letter {
font-size:161.8%;
font-weight: bold;
}


After deleting this style, which didn't work anyway, the "minor errors" message was no longer displayed.

p. newsectioninitialfirstletter{
font-size: 161.8%;
font-weight: bold;
line-height: 0
}

That should work fine. Oh it's not a drop cap. A drop cap sits to the right and drops two or three lines.