-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some problems with (X)HTML 5 specification #274
Comments
From [email protected] on June 24, 2013 19:16:09 You generated an EPUB 2 containing XHTML 1.1 content using Calibre, so all the errors are valid. You need to convert the content to EPUB3/XHTML5 if you want it to validate as such. |
From [email protected] on June 25, 2013 00:13:42 Right. In this case epubcheck, I think, should alert about the inconsistency between the epub version and the doctype of XHTML files, since it's preferable that you'll convert the epub 2 to an epub 3 instead of convert all xhtml 5 documents to a previous xhtml specification. In theory this is another issue, you can close this bug and open another one if you want :) |
From [email protected] on June 25, 2013 05:19:58 But no doctype was specified in these files that I found, so epubcheck is doing exactly what it should for an epub declared as 2.0 in the OPF. If the html5 doctype had been specified, then I agree it would be useful to at least report an unexpected doctype. |
From [email protected] on July 07, 2013 04:23:30 Well, the fact the doctype is removed is a calibre bug. Anyway I think epubcheck should alert you the doctype is missing, since html 5 specs requires it: http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype |
The doctype requirement only applies to the HTML serialization in HTML5: XML documents may contain a DOCTYPE if desired, but this is not required to conform to this specification. This specification does not define a public or system identifier, nor provide a format DTD. And technically there is a set of obsolete DTDs that can be used with HTML5 as defined in that doctype section, one of which is the XHTML 1.1 doctype epub 2 uses. XHTML 1.1, on the other hand, does require a doctype: There MUST be a DOCTYPE declaration in the document prior to the root element. But I don't think it's invalid to use the HTML5 doctype in an XHTML 1.1 file from what I see. The XHTML 1.1 specification doesn't require any specific doctype, only that one be present. So, long story short, epubcheck should have emitted a warning that no doctype was present for the epub 2 content documents, but had doctypes been inserted I still think it would have resulted in confusion since the doctype isn't used for validation. |
Closing as invalid. The part about EPUBCheck checking the XHTML 1.1 doctype declaration can be tracked in #982. |
From [email protected] on May 30, 2013 13:15:26
VERSION:
3.0
STEPS TO REPRODUCE:
RESULT: epubcheck reports the errors:
a. attribute "class" not allowed here [in "html" tags]
b. element "script" missing required attribute "type"
c. value of attribute "dir" is invalid ["auto"]
d. attribute "srcset" not allowed here [in "img" tags]
e. attribute "role" not allowed here [in "div" tags]
EXPECTED: None of these errors should be displayed. In (X)HTML 5:
a. "class" attribute is allowed in any tag
b. attribute "type" is no longer required for "script" tags
c. attribute "dir" can have value "auto"
d. "srcset" is a proposed html extension for images: http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/ e. "role" attribute seems to be reintroduced in HTML 5: http://www.w3.org/TR/role-attribute/
Attachment: autism.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=274
The text was updated successfully, but these errors were encountered: