![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,050
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
W3C: at-rule namespace not implemented
At the end of editing a book with Sigil, I like to validate epubs with W3C also. There often appears the error: "Sorry, the at-rule @namespace is not
implemented." On the top of my css appears: @namespace h "http://www.w3.org/1999/xhtml. The books are readable, but I would like a correctly formed epub. Only that I have no idea what I'm doing wrong. Someone can tell me what I have to do, please? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Remove the @namespace. It should not be necessary.
|
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,050
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Whee! That worked: "No error found". Thanks!
![]() |
![]() |
![]() |
![]() |
#4 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Hey Toxaris. I ran into the same issue. (screenshot 193). Being a non-techie, so that just means I should remove just
Code:
@namespace And maybe, what purpose did it serve? Thanks. Actually I just tested it and it wanted me to remove: Code:
@namespace "http://www.w3.org/1999/xhtml"; Last edited by Gregg Bell; 10-10-2016 at 02:04 PM. Reason: tested something |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,698
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
@Gregg Bell:
AFAIK, CSS namespace declarations are a CSS3-only feature and will always generate W3C error messages if the selected Stylesheet Validation Level is CSS Level 2.1. You could theoretically change the CSS level via Edit > Preferences > Settings > General Settings, and if you change the value to CSS Level 3, the W3C validator will no longer display a namespace error message. However, selecting CSS Level 3 isn't recommended for epub2 book stylesheets, because the epub2 standard was based on CSS Level 2.1 and some older epub engines might not support CSS3-only elements. Therefore it's better to simply delete CSS namespace declarations in epub2 books, unless the (X)HTML files contain non-standard namespace declarations. AFAIK, CSS namespace declarations are only required for epub3 book stylesheets and only if you want to select elements with epub:type attributes. For example the following stylesheet code: Code:
@namespace epub "http://www.idpf.org/2007/ops"; *[epub|type='pagebreak'] { display: none; } Code:
<span epub:type="pagebreak" id="page1">1</span> Last edited by Doitsu; 10-12-2016 at 01:48 AM. |
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,050
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
@Doitsu
Thank you for this explanation! I have always been wondering what the namespace declaration should be good for. |
![]() |
![]() |
![]() |
#7 | |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
Code:
@namespace "http://www.w3.org/1999/xhtml"; Not just: Code:
@namespace |
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,698
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#9 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
W3C CSS Validation opens with Notepad++ | Moonraker | Sigil | 4 | 05-25-2013 01:00 PM |
W3C css Validator problem? | pete6055 | Sigil | 14 | 02-28-2013 09:19 AM |
W3C Validation says: Elements are undefined | verydeepwater | ePub | 7 | 01-11-2013 05:09 AM |
How neccessary is namespace? | GraciousMe | Sigil | 2 | 11-10-2012 04:02 AM |
Namespace declaration | ChrisI | Sigil | 1 | 08-22-2010 06:02 AM |