MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Validation errors (https://www.mobileread.com/forums/showthread.php?t=259529)

azupak 04-23-2015 09:24 AM

Validation errors
 
Hi,
I'm new to Sigil. I've started creating new epub from scratch and when i try to validate file (just for check if i did everything allright till now) i had erros - for example:

for this line
Code:

<a id="note10" href="#note10b"><sub>[10]</sub></a><sub><font size="2">&nbsp;</font><font size="2">Stanisław Kucharski, b. April 26th 1918 in Żywiec. More→ BIOGRAPHIES</font></sub>
i have this errors:

- no declaration found for element 'font'
- element 'font' is not allowed for content model

What's it all about?

Greetings
Chris

DiapDealer 04-23-2015 09:36 AM

Quote:

Originally Posted by azupak (Post 3088752)
for this line
Code:

<a id="note10" href="#note10b"><sub>[10]</sub></a><sub><font size="2">&nbsp;</font><font size="2">Stanisław Kucharski, b. April 26th 1918 in Żywiec. More→ BIOGRAPHIES</font></sub>
i have this errors:

- no declaration found for element 'font'
- element 'font' is not allowed for content model

What's it all about?

"element 'font' is not allowed for content model"

The font tag is not valid in xhtml

With any validation error that includes the phrase "element '<blah>' is not allowed" in the description, it's fairly safe to assume that the tag/element <blah> is not valid. Doesn't mean it can't work. It just means that the specs don't want you to use it.

I'm guessing you're using some old mobi-markup-based source code for your book? Mobiml is based on html 3.2 and will contain lots of markup that's not valid in xhtml.

azupak 04-23-2015 09:43 AM

Ok, so can i change it for something else? Why this application adds tags which cause errors?

DiapDealer 04-23-2015 09:55 AM

Quote:

Originally Posted by azupak (Post 3088774)
Ok, so can i change it for something else? Why this application adds tags which cause errors?

Sigil didn't add the font tags. They had to have been in your original source. The only tag Sigil will add that won't validate (that I'm aware of) is the '<u>' tag when adding underlines in wysiwyg mode. Sigil doesn't add '<font>' tags for any reason.

If you want to make an element's text larger or smaller, you should assign css to that element's class to do so. If it's already within a block element you may have to add span tags to accomplish it.

Code:

<a id="note10" href="#note10b"><sub>[10]</sub></a><sub><span class="smaller">&nbsp;Stanisław Kucharski, b. April 26th 1918 in Żywiec. More→ BIOGRAPHIES</span></sub>
span.smaller { font-size: .75em; }

azupak 04-23-2015 10:05 AM

Thanks! I'll try this

exaltedwombat 04-25-2015 09:13 AM

What exactly does "creating new epub from scratch" mean? What's your process?

azupak 05-01-2015 10:17 AM

It means that i've started creating ebook in Sigil by using copy/paste method (copy from Word and paste to Sigil as 'clean' text, chapter by chapter) but after 2 chapters I realized that it's not as good idea as i thought, so after that I cleaned whole Word document by using regular expressions and then pasted it into Sigil.

Toxaris 05-01-2015 01:16 PM

Cleaning HTML via RegEx is not a good idea. A lot can go wrong. You could use my Word add-in, that will create clean code and an ePUB directly from Word if you want.

Notjohn 05-02-2015 07:29 AM

Quote:

Originally Posted by Toxaris (Post 3093928)
You could use my Word add-in, that will create clean code and an ePUB directly from Word if you want.

Oh gosh, I suppose I must buy a new version of Word! The plug-in doesn't work with Word 2000, as I recall, so I have leaned on Word2CleanHtml online. (I finish up my books in Word for the sake of the curly quotes and the em dashes etc.)

But Word to epub? Really? How obsessive does a Wordster have to be, with Styles and such, to get a good result exporting via the plug-in?

exaltedwombat 05-02-2015 11:58 AM

Just as obsessive as he will have to be in an ePub editor, if he's been sloppy in Word!

Toxaris 05-02-2015 01:47 PM

Quote:

Originally Posted by Notjohn (Post 3094440)
Oh gosh, I suppose I must buy a new version of Word! The plug-in doesn't work with Word 2000, as I recall, so I have leaned on Word2CleanHtml online. (I finish up my books in Word for the sake of the curly quotes and the em dashes etc.)

But Word to epub? Really? How obsessive does a Wordster have to be, with Styles and such, to get a good result exporting via the plug-in?

So sorry not to support a version over 15 years old... It supports Office 2007 and even that is 9 years old... It uses features not available in Word in the older versions, so I cannot even port it even if I want to.

Yes, Word to ePUB. You don't even have to be obsessive to find it useful. It will create a good ePUB with clean HTML (even if you don't use styles), will split on headers, handles tables, lists, footnotes and basic formatting (more formatting if you use styles). You can create the ePUB and after creation automatically start up Sigil of Calibre editor to further process. It saves a lot of time cleaning up and produces much better results than the Word2CleanHtml online. And yes, I have checked that.

It has many, many more options and exporting to ePUB is just one of them and not even the most important one. Even if you don't find the addin and this option useful, others do.
To each its own.

Notjohn 05-03-2015 07:07 AM

I can't use more recent iterations of Word than 2003 because they lack the ability to open WordStar files. WordStar is the best of all possible word processors, and I'll not give it up until I am no longer able to beat Windows into submission to run a DOS program, not even for your plug-in! It would be like touch-typing with just one hand!

DiapDealer 05-03-2015 08:36 AM

Quote:

Originally Posted by Notjohn (Post 3094939)
I can't use more recent iterations of Word than 2003 because they lack the ability to open WordStar files. WordStar is the best of all possible word processors, and I'll not give it up until I am no longer able to beat Windows into submission to run a DOS program, not even for your plug-in! It would be like touch-typing with just one hand!

Please. This whole "WordStar is the best" hoo-hah is nothing but nostalgia, comfort-level, and familiarity. If it's so perfect, why do you need to be able to open its finished product in Word at all?

If it was truly "the best of all possible word processors," they'd still be selling versions of it for the latest Windows. It's more like; "I already put my time in learning the ins and outs of WordStar and have no desire to spend the time necessary to do the same with a newer Wordprocessing program, so I cling desperately to the past while convincing myself that I do so for purely objective "betterness" reasons rather than it simply being a case of subjective personal preference and a lack of desire to retool."

Nothing at all wrong with wanting to stick with what you know. It's just not reasonable to expect the rest of the world to accommodate your dated preferences ad infinitum.

Toxaris 05-03-2015 10:35 AM

Quote:

Originally Posted by Notjohn (Post 3094939)
I can't use more recent iterations of Word than 2003 because they lack the ability to open WordStar files. WordStar is the best of all possible word processors, and I'll not give it up until I am no longer able to beat Windows into submission to run a DOS program, not even for your plug-in! It would be like touch-typing with just one hand!

So, because you think Wordstar is the best, nobody should use a newer version of Word... Why did you respond to my message anyway? It had nothing to do with the original post and is apparently just for bashing others and showing your presumed superiority in working with ancient word processors. Fine, if you get a kick out of that. I will not respond to this anymore. I just gave the OP an alternative that will work for normal people that move along instead of grasping to the ancient ways.

theducks 05-03-2015 11:24 AM

Quote:

Originally Posted by Toxaris (Post 3094588)
So sorry not to support a version over 15 years old... It supports Office 2007 and even that is 9 years old... It uses features not available in Word in the older versions, so I cannot even port it even if I want to.

Yes, Word to ePUB. You don't even have to be obsessive to find it useful. It will create a good ePUB with clean HTML (even if you don't use styles), will split on headers, handles tables, lists, footnotes and basic formatting (more formatting if you use styles). You can create the ePUB and after creation automatically start up Sigil of Calibre editor to further process. It saves a lot of time cleaning up and produces much better results than the Word2CleanHtml online. And yes, I have checked that.

It has many, many more options and exporting to ePUB is just one of them and not even the most important one. Even if you don't find the addin and this option useful, others do.
To each its own.

I still have my WS 5.5 (on 5.25" floppies.) :D
There is the small issue that none of my systems have/can use that size drive (I could never get XP to USE the drive, so I took it out and used the space for a 100M Zip Drive ((I still have blank Zip discs :eek:)) )

Turtle91 05-03-2015 11:53 AM

Quote:

Originally Posted by theducks (Post 3095036)
I still have my WS 5.5 (on 5.25" floppies.) :D
There is the small issue that none of my systems have/can use that size drive (I could never get XP to USE the drive, so I took it out and used the space for a 100M Zip Drive ((I still have blank Zip discs :eek:)) )

OMG! I totally forgot about the Zip drive!! Thanks for making me feel like I'm so old that I'm forgetting things.... :rofl:

murg 05-03-2015 05:54 PM

Quote:

Originally Posted by Turtle91 (Post 3095057)
OMG! I totally forgot about the Zip drive!! Thanks for making me feel like I'm so old that I'm forgetting things.... :rofl:

I just sent a Zip drive to the tip...

murg 05-03-2015 05:56 PM

Quote:

Originally Posted by Notjohn (Post 3094939)
I can't use more recent iterations of Word than 2003 because they lack the ability to open WordStar files. WordStar is the best of all possible word processors, and I'll not give it up until I am no longer able to beat Windows into submission to run a DOS program, not even for your plug-in! It would be like touch-typing with just one hand!

I made it a point to avoid WordStar in my career (which pre-dates it).

And I succeeded!

I always viewed as one of those programs that becomes popular for no apparent reason, and then stays popular because no one wants to change.

PeterT 05-03-2015 07:40 PM

It became popular back in the days of CP/M, and by having it's key bindings adopted by other tools like Sidekick and the Turbo Pascal IDE.

theducks 05-03-2015 07:46 PM

Quote:

Originally Posted by murg (Post 3095236)
I made it a point to avoid WordStar in my career (which pre-dates it).

And I succeeded!

I always viewed as one of those programs that becomes popular for no apparent reason, and then stays popular because no one wants to change.

Wordstar DOS (I started at WS 3.0) the original with dot command markup?
or the later
Windows versions?

All the early DOS stuff ran on 8080 processors with up to 640K RAM

IIRC the big players were

Word Processing: Word, Wordperfect, Wordstar
Spreadsheet: 123, Supercalc, Multiplan, Quattro
RDatabase: dBase, Paradox, (RBase? brain fade :o )

BetterRed 05-03-2015 10:06 PM

@theducks You forgot Visicalc - AFAIK it was first spreadsheet - an Apple II killer app, but for Viscalc there might not be an Apple.

And Multimate Word processor - an IBM PC killer app that killed the Wang WP system, it wasn't much known outside of large corporations - Conn Life commissioned its development. I recall some C programmers using it as an editor - the alternative was EDLIN :lol:

Can't remember if it was William Safire or William F. Buckley who used Wordstar up until the day they died - might have been both. I miss them - not that I always agreed with them, but they could turn a phrase or two and raise a wry smile; most of today's equivalents can only beget groans of despair... so many words, so little said :cry:

BR

Notjohn 05-04-2015 09:00 AM

Quote:

Originally Posted by theducks (Post 3095276)
Wordstar DOS (I started at WS 3.0) the original with dot command markup?
or the later
Windows versions?

Oh, DOS, of course!

It is a brilliant program, never matched in all the years since. It is in effect a third keyboard level, so that one has lower case, caps, and editing commands, all without looking at the keyboard or moving one's hand off the home keys. I went from 42 wpm on a manual typewriter to 100 wpm on an Olympic electronic typewriter with a CPM computer extension running what I suppose was WS 3.

Mike Petrie has created a WordStar command set for Word that makes the clunky Microsoft software function well, though not perfectly. (One must switch to Alt-A to Mark All, for example.) I usually finish up manuscripts on Word, because that's how editors expect to receive them.

I have successfully punted WordStar (it's 7D, the last release) through all successive Windows machines, down to Win 7 32-bit. It still works perfectly though I have lost the ability to copy from WS to Clipboard (I can go the other way), so in the rare case where I must do this, I open the WS file in Notepad. I also can no longer print from WS, though most afficionados have built a workaround use Ghostscript for that purpose.

IMHO the introduction of WordStar made the whole computer revolution worthwhile, even if it had never led to nothing else. I cannot imagine doing without it.

Tex2002ans 05-05-2015 10:36 AM

I second everything Toxaris said about his plugin, it is absolutely glorious, and can make clean/barebones HTML out of any sort of messy DOC(X)s you might get your hands on.
  • Word -> Google Docs (add in comments, make edits, etc. etc.) -> Word? No problem.
  • Finereader DOC(X) mess -> Word? No problem.
  • Horrible abomination edited over the years by multiple people using completely different versions of Word? No problem.
  • Someone copied/pasted quotes from different websites into Word, and then "fixed" them so they "look perfectly fine" on the surface? No problem.

Quote:

Originally Posted by Notjohn (Post 3095555)
IMHO the introduction of WordStar made the whole computer revolution worthwhile, even if it had never led to nothing else. I cannot imagine doing without it.

Posted by Notjohn using Netscape. :rofl:

exaltedwombat 05-05-2015 10:43 AM

Quote:

Originally Posted by Notjohn (Post 3094939)
I can't use more recent iterations of Word than 2003 because they lack the ability to open WordStar files. WordStar is the best of all possible word processors, and I'll not give it up until I am no longer able to beat Windows into submission to run a DOS program, not even for your plug-in! It would be like touch-typing with just one hand!

I guess you're still driving a Model T Ford too? :-)


All times are GMT -4. The time now is 07:59 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.