Search:

Welcome

Login to contribute. Register if you haven't yet.

Need Support?

Search this site to find an answer. If you still need help, post a Question. Private or account-related support inquiries can be made at the Contact Center.

How can I add a DOCTYPE to my Layout?

If you place a DOCTYPE at the top of an EditMe Layout, you may receive one of the following errors:

/opt/jakarta-tomcat-5.5.9/bin/DTD/xhtml1-strict.dtd 
(No such file or directory) 
Error on line 31 of document
http://www.w3.org/TR/html4/loose.dtd : The declaration for the entity
"HTML.Version" must end with '>'.

This is because of a limitation in the XML parser EditMe uses to process Layouts.

You can use the following syntax to include a DOCTYPE in your layout:

<html> 
  <head>
    <doctype><![CDATA[
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></doctype>
    ...
  </head>
  <body>...

Note that the DOCTYPE tag is within a <doctype><![CDATA[ ... ]]></doctype> node. This allows the tag to pass through the XML parser. EditMe then looks for this tag within the HEAD tag of the layout and puts it at the top of the document if found.