Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-14-2021, 07:05 PM   #1
apgoogh
Junior Member
apgoogh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2021
Device: none
epub:type not validating

I have an epub that I have added the epub:type. The epub as a whole validates but when I try to validate the individual xhtml files I get errors like

Attribute type from namespace http://www.idpf.org/2007/ops not allowed on XHTML element section at this point.

and

Attribute type from namespace http://www.idpf.org/2007/ops not allowed on XHTML element span at this point.

Sample code:
<html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta charset="UTF-8" />
<title>Winning Stories</title>
<link rel="stylesheet" type="text/css" href="../Styles/THAB.css"/>
</head>

<body>
<section role="doc-part" epub:type="part" aria-labelledby="partwin">
<h1 id="partwin">WINNING STORIES</h1>

<a id="section_1"></a>
<section role="doc-chapter" epub:type="chapter" aria-labelledby="sigil_toc_id_1">
<h2 class="chapter" id="sigil_toc_id_1"><span id="page001" title="1" epub:type="pagebreak" role="doc-pagebreak"/>Story Title</h2>

The namespace is in the <html> tag. I cannot find a reason for attribute to be causing an error.

The epub package passes validation at https://epubcheck.mebooks.co.nz and runs clean in Ace by Daisy. It's W3C's markup validation service that individual files fail.

Any suggestions?

Thanks.
apgoogh is offline   Reply With Quote
Old 11-14-2021, 07:27 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,675
Karma: 5433388
Join Date: Nov 2009
Device: many
Are you validating this file as xhtml or as html. Only in the former is the namespace defined?

Is this xhtml well-formed?

If your epub passes epubcheck, I would not worry about w3c validators for pure html.

Last edited by KevinH; 11-14-2021 at 07:37 PM.
KevinH is offline   Reply With Quote
Advert
Old 11-14-2021, 09:07 PM   #3
apgoogh
Junior Member
apgoogh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2021
Device: none
I am uploading an xhtml file to the w3c validator.

The book does pass the epub check. It just makes no sense to me that the xhtml does not validate. Would this be a problem with the validator? or with the code? My use of the type attribute matches the recommendations in EPUB Accessibility Techniques 1.0 as well as in sample code I have found.

There is very little out there (read: google) on this error, so it makes me think there is something I am doing wrong.
apgoogh is offline   Reply With Quote
Old 11-14-2021, 09:17 PM   #4
apgoogh
Junior Member
apgoogh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2021
Device: none
I wonder if it has to do with html5. See article: http://codinginparadise.org/ebooks/h...ampaign=buffer
apgoogh is offline   Reply With Quote
Old 11-14-2021, 10:00 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,675
Karma: 5433388
Join Date: Nov 2009
Device: many
No. "Tag soup" html is not xhtml. My guess is the w3c validator is only validating html (what the writer called tag soup) and is not an xhtml validator.

Again, I would not trust the w3c validator to validate real xhtml. If it passes epubcheck and is well-formed xhtml/xml then I think you are fine. A good way to check your xhtml is to load your epub into Sigil or Calibre's editor and look if Preview detects any not well-formed errors.
KevinH is offline   Reply With Quote
Advert
Old 11-15-2021, 09:03 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,585
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@apgoogh

EPUBCheck is better suited for your purposes.

Shameless plug: You might want to install my EPUBCheck Sigil plugin and validate your book with it.
Doitsu is offline   Reply With Quote
Reply

Tags
epub 3, epub:type, validation errors


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error when validating epub serendipity22 Sigil 3 06-01-2019 09:21 AM
Errors while validating EPUB crankypants ePub 21 12-05-2015 10:21 PM
Validating Epub Thom* Editor 6 07-08-2015 04:17 AM
validating epub fails - how do I correct? BeccaPrice ePub 14 06-12-2013 02:01 PM
Issues validating EPUB for iPad godsmac Calibre 13 06-26-2011 09:02 PM


All times are GMT -4. The time now is 04:36 AM.


MobileRead.com is a privately owned, operated and funded community.