MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Validate ePub (https://www.mobileread.com/forums/showthread.php?t=63273)

Haya 11-25-2009 11:10 AM

Validate ePub
 
1 Attachment(s)
What I wrong?:blink:
I open Sigil 1.5
I write a single line of text "a text"
Save as epub
try to Validate ePub documents using
http://www.threepress.org/document/epub-validate

and i have this:
# ERROR: mytest.epub/OEBPS/content.opf(6): unfinished element
# ERROR: mytest.epub/OEBPS/toc.ncx(15): unfinished element
# ERROR: mytest.epub/OEBPS/toc.ncx(5): assertion failed: first playOrder value is not 1

zelda_pinwheel 11-25-2009 11:11 AM

looks like you didn't put any of the meta data (title, author, etc.) in the meta editor or add the toc via the toc editor. that is required.

pdurrant 11-25-2009 12:44 PM

1 Attachment(s)
As Zelda says, you must fill in the Title and Author metadata.

But you also need at least one heading, as the toc.ncx requires a navmap element with at least one entry, and Sigil builds this from headings.

Here's a minimal ePub based on yours using Sigil 1.5 that does pass epubcheck 1.04,

Valloric 11-25-2009 12:49 PM

Quote:

Originally Posted by pdurrant (Post 668781)
But you also need at least one heading, as the toc.ncx requires a navmap element with at least one entry, and Sigil builds this from headings.

Huh. Now that I didn't notice. Sigil should handle files with no headings. Paul, please create an issue with this.

pdurrant 11-25-2009 03:29 PM

OK, done. issue #174, with sample file showing the problem attached.

Perhaps it would also be a good idea to auto-fill the author and title metadata fields. The title from the file name, and the author from the current user?


Quote:

Originally Posted by Valloric (Post 668790)
Huh. Now that I didn't notice. Sigil should handle files with no headings. Paul, please create an issue with this.


Jellby 11-25-2009 03:36 PM

Quote:

Originally Posted by pdurrant (Post 668934)
Perhaps it would also be a good idea to auto-fill the author and title metadata fields. The title from the file name, and the author from the current user?

I would only do that if the user tries to save without setting them, and after asking if that is OK.

Valloric 11-25-2009 03:57 PM

Quote:

Originally Posted by pdurrant (Post 668934)
OK, done. issue #174, with sample file showing the problem attached.

Perhaps it would also be a good idea to auto-fill the author and title metadata fields. The title from the file name, and the author from the current user?

Quote:

Originally Posted by Jellby (Post 668943)
I would only do that if the user tries to save without setting them, and after asking if that is OK.

Jellby nicely points out the problem. I've intentionally left it up to the user to input the required metadata fields for validation (author, title, language). Sigil will not auto-fill these fields. The best it could do is inform the user that he left them blank, but I rejected that idea because it would quickly become annoying if you don't really care about this and are just making a quick epub for personal use.

This will have to wait until I write and integrate a fully-fledged epub checker that would (optionally) inform the user about all the validation problems with his book, and not just this.

But the heading issue is different. An epub file with no headings is perfectly valid, and Sigil shouldn't make an invalid epub from that.

KevinH 11-27-2009 05:22 PM

epub validation
 
FWIW,
For validation I use epubcheck-1.0.5.jar (which you can download from the source tree and build yourself). Being java it will run on almost every platform (I have tried it on Mac's Linux, and Windows and it works) and an interface via pipes to invoke it and collect its stderr and stdout would be a wonderful thing to have in Sigil.

In fact, the ability to invoke any command line program and pipe in input and back in stderr and stdout would make for a very simply but wonderfully useful "plugin-like" capability for Sigil without having the hassle of implementing a full C++ to python or perl "bridge".

You could maybe have an OpenOffice.org style helper application interface where users specify the command and argument and OOo assigned a menu or key sequence that invokes it and allows for requesting and passing arguments to and from it.

If that existed, I would love to be able to use some python and perl scripts with Sigil. Right now, I know of 2 really good pml to html converters (one in perl and one in python) that could be integrated as plugins to support reading in pml files and outputting epub files by invoking a command line and reading in the resulting html into Sigil.

Is there any kind of "helper application", "extension" or "plugin-like" capability in Sigil right now or any planned?

Thanks,

KevinH

Valloric 11-27-2009 06:32 PM

Quote:

Originally Posted by KevinH (Post 671345)
Is there any kind of "helper application", "extension" or "plugin-like" capability in Sigil right now or any planned?

See this thread and this thread.


All times are GMT -4. The time now is 06:43 PM.

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