View Single Post
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