09-09-2011, 01:34 PM
I have two validation errors that keep cropping up:
"attribute "lang" not allowed here; expected attribute "dir" or "version" "
"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.
09-09-2011, 02:15 PM
It would probably help to see a snippet of the code that produced the error(s).
09-09-2011, 05:05 PM
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 />
Through memories?<br />
Or through my soul?</em></p>
09-09-2011, 07: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.
09-12-2011, 02:25 PM
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?
09-12-2011, 02: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"
09-12-2011, 06:13 PM
The code did the trick - thank you very much for the help!