error uploading to Amazon

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
Hi,
I just got done formatting my book for Kindle. I started with a Word document, put it through Notepad, formatted it in JEdit, and saved it as an .html. When I try to upload, I get an error. When I look at the html file online, there is no problem. When I save in jEdit, there is no problem. When I try to open the html document in Word, it won't do it. It says DTD is prohibited, line 2, column 9.

Help, please!

Thanks in advance.
 

Alexys

Took a wrong turn at the Pleiades
Super Member
Registered
Joined
Jun 5, 2011
Messages
341
Reaction score
30
Location
On the wrong planet. ;P
Well, what's at line 2, column 9? Chances are that you have a tag in there that isn't legal for whatever version of HTML the document purports to be (or possibly doesn't even exist). Your web browser would pass it because they're designed to be forgiving of bad HTML, and jEdit would pass it because it's just a syntax highlighter and not a full parser.
 

qwerty

exiled Brit
Super Member
Registered
Joined
Mar 9, 2007
Messages
1,076
Reaction score
222
Location
Burgundy
You don't need to put it thro notepad or JEdit. Just save it from WORD as web page filtered and upload that file.
 

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
Well, what's at line 2, column 9? Chances are that you have a tag in there that isn't legal for whatever version of HTML the document purports to be (or possibly doesn't even exist). Your web browser would pass it because they're designed to be forgiving of bad HTML, and jEdit would pass it because it's just a syntax highlighter and not a full parser.

I have no idea. I just copy and paste from Guido Henkel's guide. Here's the first few lines from the top of the doc:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <head>
    <style type="text/css">
      html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, pre, table, th, td, tr { margin: 0; padding: 0em; }
           p
{
  text-indent: 1.5em;
  margin-bottom: 0.2em;
}
p.chapter
{
  text-indent: 0.1em;
  font-weight: bold;
  font-size: 1.5em; 
  page-break-before: always;
  margin-top: 5em;
  margin-bottom: 2em;
}

Thank you so much for responding!
 

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
You don't need to put it thro notepad or JEdit. Just save it from WORD as web page filtered and upload that file.

Hi Qwerty,
If I can't get it to work I'll do that. I just like having a nice clean doc, and in the past it's worked fine. Thanks for responding!
 

Alexys

Took a wrong turn at the Pleiades
Super Member
Registered
Joined
Jun 5, 2011
Messages
341
Reaction score
30
Location
On the wrong planet. ;P
Well, you're missing the enclosing top-level element that the XHTML standard prescribes for documents. Try adding the following line just before <head>:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

(I'm assuming your document is in English; if it isn't, you might need a different two-letter code if you want to be strictly correct.) You'll need the corresponding closing tag </html> at the end of the document, if it isn't there already.

It's hard to tell whether this is the actual problem, though. Amazon and Word may even be having different problems with the document (and someone at Microsoft needs to learn how to write better error messages).
 

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
Alexys, thank you! I will try this and come back and edit to let you know how it turned out. I'm so grateful for the help!

ETA: I can now open it in Word. I'll see if Amazon will take it next.

ETA2: Alexys, you are my hero. It worked! I'm like Golem when he finally got the ring back, minus the lava canyon.
 
Last edited:

Maryn

At Sea
Staff member
Super Moderator
Moderator
Kind Benefactor
Super Member
Registered
Joined
Feb 12, 2005
Messages
55,679
Reaction score
25,853
Oh, we all love a happy ending. Glad you got what you needed. Whew, huh?

Maryn, pleased for you