Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2013, 06:42 PM   #1
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
Plain Vanilla Stylesheet Prevents Validation

I have just one issue preventing validation of my ePub file: "non-standard stylesheet resource 'OEBPS/css/stylesheet.css' of type 'css'. A fallback must be specified."

I have a plain vanilla stylesheet created in Notepad++. I have not used any templates or proprietary software to create my XHTML files or my stylesheet. The only font specification in my stylesheet is font-family: normal;. Everything is very basic, as I wanted readers to be able to have as much control as their devices would allow.

It just doesn't make any sense to me that the idpf.org validator would take exception to my stylesheet and demand a fallback for an unspecified attribute. I get the error message above for every XHTML page in my ePub file. If the validator gave me a hint of what it wanted a fallback for it wouldn't be so frustrating.

I've attached a copy of the stylesheet as an XML file.

Thanks for your help.
Attached Files
File Type: xml stylesheet.xml (2.7 KB, 295 views)
MikeWV is offline   Reply With Quote
Old 11-16-2013, 07:54 PM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by MikeWV View Post
I have just one issue preventing validation of my ePub file: "non-standard stylesheet resource 'OEBPS/css/stylesheet.css' of type 'css'. A fallback must be specified."

I have a plain vanilla stylesheet created in Notepad++. I have not used any templates or proprietary software to create my XHTML files or my stylesheet. The only font specification in my stylesheet is font-family: normal;. Everything is very basic, as I wanted readers to be able to have as much control as their devices would allow.

It just doesn't make any sense to me that the idpf.org validator would take exception to my stylesheet and demand a fallback for an unspecified attribute. I get the error message above for every XHTML page in my ePub file. If the validator gave me a hint of what it wanted a fallback for it wouldn't be so frustrating.

I've attached a copy of the stylesheet as an XML file.

Thanks for your help.
I didn't see any bad in your stylesheet; but it must be named as "stylesheet.css" and not "stylesheet.xml". Change its name in Sigil and after that link all your xhtml files with that stylesheet. Do that and I think your troubles will be over.
RbnJrg is offline   Reply With Quote
Advert
Old 11-16-2013, 08:11 PM   #3
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It is one of the advantages of Sigil is that whatever you create will be valid. It will zip up the epub in the appropriate order too.

You might give it a try, it makes epub creation much easier and you can shell out to your favorite editor by right clicking to open with.

In this case, you would have right clicked on the styles folder, create new spreadsheet and it would have been properly named. When you created your various sections, you just select them and right click to link stylesheets. Just that easy.
mrmikel is offline   Reply With Quote
Old 11-17-2013, 02:43 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by MikeWV View Post
"non-standard stylesheet resource 'OEBPS/css/stylesheet.css' of type 'css'. A fallback must be specified."
"of type 'css'"? The media-type (in the OPF file) of CSS files must be "text/css", not "css". May that be the problem?
Jellby is offline   Reply With Quote
Old 11-17-2013, 08:25 AM   #5
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
You picked it, Jellby. I changed the media type to text/css and all the css errors went away. I figured it was probably something simple that someone with more experience would catch.

The file was indeed named stylesheet.css. I just had to change the extension so that it could be uploaded, as css is not one of the file types allowed for uploading.

Unfortunately I found one other inexplicable error that I hadn't noticed buried in all the css errors. I'll start a new thread for that one.

Thanks to all.

Scratch that other problem! That, too, was something simple. I had a space in toc.ncx where should have been none.

I downloaded and installed Sigil but didn't use it other than to see if it could open and display my book. I may try using that for my next book.

Last edited by MikeWV; 11-17-2013 at 08:34 AM.
MikeWV is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stylesheet validation issue Dillinquent Sigil 6 04-24-2013 10:10 PM
Vanilla Linux on M92? ManDay Onyx Boox 2 11-09-2012 03:17 AM
Vanilla ROM for the Vox mike998 Kobo Tablets 13 01-27-2012 02:05 PM
metronome fb driver is now in vanilla Linux 2.6.25-rc7 Antartica News 0 03-26-2008 01:14 PM


All times are GMT -4. The time now is 07:29 AM.


MobileRead.com is a privately owned, operated and funded community.