![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
SVG in stylesheet?
Part of the background to this post is that I'm starting to explore how to use SVG images. Another part is that I dabbled with website design in the olden days, and always made sure that the HTML files validated to W3C standards.
I've experimented with a Coverpage.html file adapted from a file which I understand is used by Sigil. But when I checked it with the W3C markup validation service it indicated 11 errors: there is no attribute xmlns, height, preserveAspectRatio, version, viewbox, width, xlmns:xlink, svg, width, xlink:href, and image for this element in this HTML version. I tried using the xhtml 1.0 transitional doctype, but it made no difference. It is easy to put height, width, and image attributes in the stylesheet, but I couldn't manage the others. Is there any way to put them in the stylesheet? or to make the file validate in some other way? |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Try using the Sigil "Add Cover" option -- it will auto-generate a new cover page based on whatever standards were coded into Sigil and using whatever image you select. It is embedded as an SVG.
|
![]() |
![]() |
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I acknowledge that the ebook that I took the file from which my file was made does validate with EPUB-Checker.exe. But I want each and every file in my ebooks to validate. |
|
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Here is a template I always use for cover.html and it validates!
PHP Code:
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks for your interest and your file. I wonder however whether we are talking past each other. I fully accept that files such as yours can be contained in an ebook which will validate with EPUB-Checker.exe. My interest is to get an HTML file which works as an SVG cover, and which validates to World Wide Web Consortium markup validation service.
I converted your file into an HTML file, and tested it with the W3C markup validation service at http://validator.w3.org/ The validation service gave the warning that there is no doctype, and tested it as an XHTML transitional file. It gave the same 12 errors that I described in a previous post. I realise that my desire to find a way of doing an SVG cover with an individual HTML file which validates to W3C standards may be quixotic, but that's what I want to do. |
![]() |
![]() |
![]() |
#6 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Why? Why the validation need? Can you clarify it for me? Hitch |
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
For example, I quickly slapped together a simple ePub with a text based SVG cover image that uses an embedded blackletter font. This ePub passes ePubCheck and displays as expected with ADE and you can easily change the cover text by editing the .svg file in Sigil. Disclaimer: This won't work on any Kindle. |
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I realise that ePubs are not websites, but I'm too old and set in my ways to change. For what it is worth I don't see much improvement in using SVG wrappers over what I do now. |
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Alex, the validator fails my input because it doesn't have !DOCTYPE element, html files require a DOCTYPE to pass validation of W3Consortium.
If you run it passed ePubChecker it passes the check and that's all that matters as far it goes for eBook validation. |
![]() |
![]() |
![]() |
#11 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
1.4.1.2: XHTML Content Document Requirements A conformant XHTML Content Document must meet these conditions:
Valid XML yes, but the only XHTML mention is the last point. |
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
stylesheet help | arethusa | ePub | 6 | 07-02-2013 12:03 PM |
Link Stylesheet Does Not Appear | smallstate | Sigil | 2 | 09-20-2012 07:43 AM |
How NOT to use a stylesheet? | karyan | Sigil | 12 | 03-07-2012 12:43 PM |
Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 08:24 PM |
Where is the stylesheet.css? | roger64 | Sigil | 4 | 03-23-2010 02:12 PM |