The entity "rsquo" was referenced, but not declared.

2,468 views
Skip to first unread message

Bryan

unread,
Jul 24, 2012, 8:20:46 PM7/24/12
to epub...@googlegroups.com
Hi all. I'm getting an error when validating an epub 3 file that I wasn't getting with epub 2. Anywhere an html encoded character is used (e.g. ’, ”, —, etc.), epubcheck returns an error like:

The entity "rsquo" was referenced, but not declared.

When I replace it with the numbered html code (something like ’) I don't get the error. Could this have something to do with the headers of the xhtml file? They are:

<?xml version="1.0" encoding="utf-8"?>
<head>
<title>Chapter Title</title>
<link rel="stylesheet"  href="template.css" type="text/css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>...

I tried looking at the examples available here but none that I've seen have anything besides &amp; which doesn't seem to give the error.

Any ideas?

Bob Myers

unread,
Aug 19, 2012, 11:16:39 PM8/19/12
to epub...@googlegroups.com
I'm also interested in solving this problem. I tried adding an XHTML1.1 DTD but no joy.
--
Bob

Edmon Samson

unread,
Aug 20, 2012, 9:43:45 PM8/20/12
to epub...@googlegroups.com
Can you try this:


<?xml version="1.0" encoding="utf-8"?>
<!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" xml:lang="en-US">

I've been using "rsquo" using this heading and I had no problems with epubcheck.

Thanks,


--
You received this message because you are subscribed to the Google Groups "epubcheck" group.
To view this discussion on the web visit https://groups.google.com/d/msg/epubcheck/-/KvTFE1h5Z84J.

To post to this group, send email to epub...@googlegroups.com.
To unsubscribe from this group, send email to epubcheck+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/epubcheck?hl=en.

Bob Myers

unread,
Aug 21, 2012, 4:34:29 AM8/21/12
to epub...@googlegroups.com
I get the following error:

ERROR: cho-kisei.epub/OEBPS/text/c10-1.xhtml(7,52): External entities are not allowed in XML. External entity declaration found: %OEBEntities
ERROR: cho-kisei.epub/OEBPS/text/c10-1.xhtml(1,1): Entity '%OEBEntities' is undeclared

--
Bob

Markus Gylling

unread,
Aug 21, 2012, 5:02:53 AM8/21/12
to epub...@googlegroups.com
Hi all and sorry for late reply,

As for alphanumerical entities like &rsquo; in content documents, the trick is to convert them to numerical entities, or convert them to their dereferenced unicode character. 

Remember that HTML5 does not include a DTD reference in the doctype statement, so in the XML serialization and as generic XML processors are concerned there is no way to have predeclared entities. (If you really need to keep &rsquo as alphanumerical, then the other solution is to declare the entities in the internal subset, but thats a lot of funky syntax with little or no gain).

Mr Myers -- your error is different. Is there any chance you could send me the file so I can have a look at it?

/markus

Edmon Samson

unread,
Aug 21, 2012, 9:44:35 AM8/21/12
to epub...@googlegroups.com
Hi Mr Myers,

May I have your file too so I can check? TIA.

Vincent Gros

unread,
Aug 21, 2012, 10:30:55 AM8/21/12
to epub...@googlegroups.com
Hi,

Here are 3 EPUB3 files that show the 3 cases (I guess):

- Error using the rsquo entity (see log);
- Ok using the html entity;
- the OEBEntities error (see log).

Hope this could help!

--
Vincent

2012/8/21 Edmon Samson <edmonj...@gmail.com>

Connect your Gmail with . Attachments.me
SimpleSample_error_OEBEntities-ec30.log
SimpleSample_error_rsquo-ec30.log
SimpleSample_error_OEBEntities.epub
SimpleSample_error_rsquo.epub
SimpleSample_ok_rsquo_number.epub
Reply all
Reply to author
Forward
0 new messages