Validation Problem

7 posts / 0 new
Last post

Dear sir,

Please suggest how to solve this errror.

ERROR OEBPS/flip_translate.xhtml 14 42 attribute "onclick" not allowed here; expected attribute "dir", "id", "style", "title" or "xml:lang"

It appears from the list of allowed attributes that you are attempting to add scripting to an EPUB 2 publication.

Scripting is only available in EPUB 3, so you'll need to upgrade your content if that is the case.

Sir i have check this content and not solve this problem,

<?xml version="1.0"?>
<html xmlns="" xmlns:epub="">
<title>Example of Media Query in EPUB 3</title>
<link rel="stylesheet" type="text/css" href="childrens-book-style.css" />

Please suggest upgrade contents.
Anil Prasad

You also need to ensure that the package document isn't identifying your publication as an EPUB 2. The version attribute needs to have the value "3.0" as follows:

<package version="3.0" 

If you have the value "2.0" epubcheck will attempt to validate your document against the XHTML 1.1 schema.

It's possible that the OP is trying to validate content prior to submission to Apple iBookstore. At the moment iBookstore is accepting EPUB 2 content "with enhancements" - that are in line with EPUB 3, including scripting. I surmise that EPUBCheck 3.0 might be less helpful in this situation, perhaps earlier versions of EPUBCheck ignored or handled differently the existence of scripting. 

Also, scripting is not illegal in EPUB 2.0.1; it is only recommended that Reading Systems "should not" executve scripts, and the spec envisions that scripting may be implemented in some cases. So, Apple iBooks is a valid extension to EPUB 2.0.1. as well as an anticipation of EPUB 3. It may be that pedantically this "onclick" attribute isn't allowable in EPUB 2.0.1. (I'm not sure, it might be a bug that EPUBCheck is calling it an error)  but that an onclick handler could still be be installed w/out invalidating content (vs. EPUB 2.0.1 spec) by using DOM manipulation.

Yes, I was working on the assumption that an EPUB 3 is the desired outcome, but you're certainly correct. The title of the posted markup seemed familiar, so now I'm actually less sure what is being asked. That's one of the titles from the EPUB 3 samples project, which doesn't contain any scripting, unless the OP is just playing around.

And epubcheck will throw the error the OP posted when an EPUB 2 contains an onclick event (or onload, etc.). It appears that the events attribute collection is not included, and I see there is an issue already logged.

To the poster, could you please verify exactly what you are attempting to do? You'll undoubtedly get better advice that way.

merhabalar.ebook için epub formatını idpf'de doğrulamak istediğimde şu hatayı veriyor."HATA OEBPS / toc.ncx -1 -1 Harici DTD kuruluşlar izin verilmez. DOCTYPE çıkarın."
zip olarak test ettiğimde bu hatayı vermiyor.Yardımcı olursanız sevinirim.

Secondary menu