bell notificationshomepageloginedit profileclubsdmBox

10.02% popularity   0 Reactions

Epubcheck reports an error for a paragraph like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>Title</title>
<link rel="stylesheet" type="text/css" href="foo.css" />
</head>
<body>
<p class="flush">"Time flies <span style="red">when</span> you're having a good time"</p>
</body>
</html>

The error comes back as:

Position 1
An error occurred while parsing the CSS: Premature end of grammar (expecting: :).

There are no other errors in the EPUB.

I don't know how to fix this error. It's the first time I've encountered it.

Worthy of note: this same epub file runs through Amazon Kindlegen with no errors.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (2)

Login to follow story

More posts by @Christopher

2 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

<p class="flush">"Time flies <span style="red">

"red" is not a valid CSS style. The style should be <span style="color:red;">

This also works: <span style="color:red; font-weight:bold;">

But in an epub, which uses XHTML, I always used classes.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

10% popularity   0 Reactions

I posted an issue at the epubcheck site.

Someone there knew right away what the problem was.

This is acceptable:

<p>Text <span class="red">red</span> regular.</p>

This is acceptable:

<p>Text <span style="color:red">red</span> regular.</p>

This is not acceptable, and is what I had:

<p>Text <span style="red">red</span> regular.</p>

It was hard for me to figure out because the character position reported by epubcheck was at the beginning of the paragraph, far away from the actual error.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

Back to top