01-09-2013, 05:50 AM | #1 |
Member
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
|
W3C Validation says: Elements are undefined
I am making a fixed layout eBook in xhtml, using Dreamweaver. I am trying to mark out a section using html5 tags: <article> and <section>. Everything looks OK, but when I validate it, I get the error message: element "article" undefined [XHTML 1.1]
Is it possible to use these elements with XHTML? Is there a way to avoid these error messages? Is it OK to ignore these error messages for ePubs? |
01-09-2013, 07:26 AM | #2 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
if you're trying to validate HTML5 as XHTML 1.1 then it's not going to work.
what you've created is an XHTML5 document (XML + HTML5), and because you likely don't have a <!DOCTYPE html> in the document, W3C is going to guess that it's XHTML 1.1/1.0 because of the <?xml ...> declaration, and throw errors when it encounters HTML5 elements. W3C validator doesn't auto-detect or allow you to select XHTML5 to validate against, so a way around this is to set the Doctype to HTML5 (Experimental) from the dropdown menu and run it that way, although this will only let you know that you've created a valid (or invalid) HTML5 document. however, if you're using anything related to the epub namespace (ie, <a epub:type="noteref" ...>) it's still not going to pass W3C. what's more important, i think, is running it through epubcheck to verify that it's a valid epub, since that validator is going to be tailored to the epub specs. still figuring all this out myself, so if anyone cares to correct me it's appreciated |
01-09-2013, 09:49 AM | #3 |
Member
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
|
Can your disregard these errors in validation
Thanks very much for the reply, it was on the lines I was beginning to suspect. Do you think then, one could ignore these errors which appear with W3C validation, as long as the file passes epubcheck?
|
01-09-2013, 09:57 AM | #4 |
Member
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
|
Have tried changing to HTML 5 experimental
I have tried changing the setting to HTML5 experimental in Dreamweaver as you suggested and I still get the error message: the elements article and section are undefined.
I couldn't understand what you meant by: <a epub:type="noteref" ...>) it's still not going to pass W3C. |
01-09-2013, 08:18 PM | #5 |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The solution is to remove all HTML5 code as it's not valid ePub code unless you are making ePub 3.
|
01-10-2013, 07:30 AM | #6 | ||
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
Quote:
Quote:
is there a 'HTML5 experimental' setting in DW? i meant to try with W3C's online validator and try the setting there. if it's telling you that <article> and <section> are undefined then it's not recognizing your document as HTML5. |
||
01-11-2013, 05:03 AM | #7 |
Member
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
|
you asked: is there a 'HTML5 experimental' setting in DW?
There is but still WC3 validation refuses to accept HTML 5 tags. can I ask about epub3. Is that widely accepted on devices now? Is there somewhere I can learn how to make an epub 3 document? |
01-11-2013, 05:09 AM | #8 |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
ePub 3 is not accepted. Might never be unless the get rid of the multimedia junk.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reset book's numeric field to blank (undefined)? | Rob557 | Library Management | 4 | 07-31-2012 03:26 PM |
(Development) What are these apparently-undefined python operators? | offby1 | Calibre | 5 | 06-26-2010 11:57 AM |
PRS-600 Sony library - Error undefined | omk3 | Sony Reader | 13 | 01-22-2010 10:52 AM |
Not loading - AttributeError: /usr/bin/python: undefined symbol: FcPatternBuild | k8oylos | Calibre | 3 | 04-09-2009 07:46 PM |
Scope for W3C's Mobile Web Best Practices published | Colin Dunstan | Lounge | 1 | 09-17-2005 08:51 AM |