View Full Version : Help with some simple errors


fresherluke
05-02-2011, 02:16 PM
hi, so I'm trying to make a pretty simple epub, but I get these errors (that make no sense to me at all) was hoping if you guys could help me out?

errors are:

html(4): unfinished element
html(6): attribute "align" not allowed at this point; ignored
html(6): required attributes missing

and then:

html(6): 'OPS/Images/$PDF1.JPG': referenced resource exists, but not declared in the OPF file

and here is the html:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<p align="center"><img src="Images/$PDF1.JPG" width="409" height="546"/></p>
</body>

if there is any help you can give it would be greatly appreciated

cheers and thanks

Jellby
05-02-2011, 02:58 PM
html(4): unfinished element

Line 4 is the </head>. It means your <head> is not correctly finished, probably because there is some compulsory element that you didn't include. I bet it's the <title>. You can just add <title></title> before </head>, if you want an empty title.

html(6): attribute "align" not allowed at this point; ignored

You can't use the attribute "align" in a <p> element. This is XHTML, not HTML, if you want alignment, use CSS.

html(6): required attributes missing

In XHTML the "alt" attribute is required for images. The "alt" attribute should contain some text for use when the image cannot be displayed, for instance in text-to-speech readers. If the image is just an ornamental illustration, you can use alt="".

html(6): 'OPS/Images/$PDF1.JPG': referenced resource exists, but not declared in the OPF file

The OPF file (maybe "content.opf", but it can have any name) should contain a manifest with all files (save some specific exceptions) in the book. You are using the $PDF1.JPG file, and it's included in the book, but it is not in the OPF manifest, and this is an error.

Use Sigil, it should make your life easier.

Toxaris
05-03-2011, 09:24 AM
I am not quite sure naming a file $PDF1.jpg is such a good idea. The dollar sign is often used as special character... Strange things could happen when readers are interpreting the book.