Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2011, 12:34 PM   #1
DTurner
Junior Member
DTurner began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: none
Epub Validation Error

Hi there,

I have two validation errors that keep cropping up:

"attribute "lang" not allowed here; expected attribute "dir" or "version" "

and:

"attribute "clear" not allowed here; expected attribute "class", "id", "style" or "title" "

The second error seems to be connected to <br/> tags - is there something that can replace the <br/> tags, so the file will validate?

I can't figure what the first error is connected to - the "lang" attribute is part of the <html> at the top of the page - should it be placed somewhere else?

Any ideas at all would be appreciated.

Thanks,
Duncan
DTurner is offline   Reply With Quote
Old 09-09-2011, 01:15 PM   #2
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
It would probably help to see a snippet of the code that produced the error(s).
st_albert is offline   Reply With Quote
Old 09-09-2011, 04:05 PM   #3
DTurner
Junior Member
DTurner began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: none
Hi,

Thanks for your response.

The code related to the first error is:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

And the (truncated) code for the second error is:

<p class="quote1"><em>The prison walls are high,<br />
My memories are intimate.<br />
[etc, etc]
Through memories?<br />
Or through my soul?</em></p>

Duncan
DTurner is offline   Reply With Quote
Old 09-09-2011, 06:09 PM   #4
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
when I insert xml:lang="en" lang="en" into the <html tag, I do not get any error from either Flight Crew or epubcheck ver 1.2.

Those attributes should be allowed in the <html> tag, as you probably already know. How are you validating the epub?

As for the other error, might it be something in the CSS quote1 selector?

But if, as I suspect, the first error is due to a bug in the validator, maybe you should try to resolve that first. The other error may go away also.
st_albert is offline   Reply With Quote
Old 09-12-2011, 01:25 PM   #5
DTurner
Junior Member
DTurner began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: none
Hi,

The epub was run through the validators on the Three Press website, and it fails the Epubcheck 1.2, but passes the Epubpreflight. I will try installing the validator to see if that makes a difference, and try adjusting the css too.

One thing, going through my notes, there was something about DTD xhtml 1.0 verses DTD xhtml 1.1, but I can't find the site that listed those as being potential issues. Do you have a sense if that would make a difference?

Duncan
DTurner is offline   Reply With Quote
Old 09-12-2011, 01:34 PM   #6
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
Here is how my .xhtml files start:

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
HTH
st_albert is offline   Reply With Quote
Old 09-12-2011, 05:13 PM   #7
DTurner
Junior Member
DTurner began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: none
Hi,

The code did the trick - thank you very much for the help!

Duncan
DTurner is offline   Reply With Quote
Reply

Tags
<br>, epubcheck, validator error

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub validation error -- what? Yuroc ePub 2 08-16-2011 01:29 PM
Epub validation Error fiona86 ePub 3 06-25-2011 12:57 AM
epub validation error drwinn Workshop 17 03-22-2011 05:10 PM
epub validation error sassanik Sigil 19 12-08-2010 05:46 AM
ePub Validation Error mrbillb ePub 6 09-28-2010 02:14 PM


All times are GMT -4. The time now is 05:07 PM.


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