-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCTYPE specified in template is not honoured by EPrints #22
Comments
This seems to be caused by the module perl_lib/EPrints/XHTML.pm, as we recently wrote in a ep-tech post. |
Ah, yes - I've just found that post. |
Had (and still have) the same problem: After 're-skin' with bootstrap we crashed using the W3C validation, because eprints overwrites the DOCTYPE-declaration in our new template / style. Support was telling me, that changing this in module perl_lib/EPrints/XHTML.pm unfortunately has bad side effects - stopping the templates working. This is because the XML parser is reaching out over the Web to download and work against the DTD. Still waiting for support answer and let you know what todo. |
Now (!) support gave me a fullfilling answer and it's easy: EPrints still uses (and needs!) XHTML and DTD validation for internal use (templates, xpag, etc.). XHTMLOutput to the browser could be easily changed in perl_lib/EPrints/XHTML.pm Change any <DOCTYPE> and <html> like '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >' into '<!DOCTYPE html>' |
This solution affects all the instances. I've an archive with different instances and I want to move gradually to HTML5, so how to have a mixed solution? |
In the templates, the html5 doctype is defined:
<!DOCTYPE html>
Somehow EPrints mangles this back to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
e.g. http://data.uel.ac.uk/12/
I think this can then cause issues in IE, when combined with the
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
tag.
The text was updated successfully, but these errors were encountered: