DTurner
09-09-2011, 12:34 PM
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
st_albert
09-09-2011, 01:15 PM
It would probably help to see a snippet of the code that produced the error(s).
DTurner
09-09-2011, 04:05 PM
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
st_albert
09-09-2011, 06:09 PM
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 (http://www.w3schools.com/tags/tag_html.asp) 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.
DTurner
09-12-2011, 01:25 PM
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
st_albert
09-12-2011, 01:34 PM
Here is how my .xhtml files start:
<?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
DTurner
09-12-2011, 05:13 PM
Hi,
The code did the trick - thank you very much for the help!
Duncan