Am 03/13/2012 11:58 PM, schrieb Dave Fisher:

On Mar 13, 2012, at 2:40 PM, Joe Schaefer wrote:

________________________________
From: Regina Henschel<[email protected]>
To: [email protected]
Sent: Tuesday, March 13, 2012 5:31 PM
Subject: Re: Doctype of websites

Hi Joe,

Joe Schaefer schrieb:
Those de.openoffice.org pages should redirect
to www.openoffice.org/de pages, if not your
DNS resolver is busted.

I had indeed set de.openoffice.org to 192.9.163.104. Removing it makes
redirecting work.

That means the pages at de.openoffice.org had been the original ones,
but will be deleted in near future. They had been imported to
ooo-site.apache.org/de and here they have got a different doctype. Right?



Well sort of. If you look at the actual document on the site
you will probably find it contains an XHTML doctype even now.
The thing is that the CMS build system as Dave has designed it
will strip most of the header matter out of the file and replace
it with a generic one supplied by a template.



    If that's not the problem
then you need to refresh your pages as they
are identical on the server.

As to why the doctype is different from the original
document, that's probably due to the way Dave worked
out the templates for the site.  If we need to scrape
the doctype out of each individual page that will require
some perl coding work, some templating work,
and another sledgehammer style commit- ie not something
to be taken lightly.

Our pages had been XHTML with all the differences to HTML. And we tried
to produce valid pages (including W3C check button). It is not
impossible to change the pages and it can be done bit by bit while
reviewing the pages. But the aim should be clear.


Well I can't advise you how to proceed from here, only point out
that there is some impedance mismatch between how your site builds
work and what's actually in these documents.  The choice seems
to be either standardize all the documents on a common doctype
or have the perl code pull the doctype out of the original document
if it exists and pass it along to the template as an argument.


You might even be better off just not supplying a doctype at all
and letting the browser figure it out.  Up to you folks.

Joe has described the current situation.

Every page in ooo-site is wrapped using the following html skeleton:

ooo/ooo-site/trunk/templates/skeleton.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<link href="/css/ooo.css" rel="stylesheet" type="text/css">
{% if header %}
{% autoescape off %}{{ header }}{% endautoescape %}{% else %}
<title>{% block title %}{{ headers.title }}{% endblock %}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% endif %}
</head>

<body>
<!--#include virtual="{{ ssi.headers.brand }}" -->
   <div id="topbara">
     {% if ssi.headers.topnav %}<!--#include virtual="{{ ssi.headers.topnav }}" 
-->{% endif %}
     <div id="breadcrumbsa">{% block breaddcrumbs %}{% autoescape off %}{{ 
breadcrumbs }}{% endautoescape %}{% endblock %}</div>
   </div>
   <div id="clear"></div>
   {% if ssi.headers.leftnav %}<!--#include virtual="{{ ssi.headers.leftnav }}" 
-->{% endif %}
   {% if ssi.headers.rightnav %}<!--#include virtual="{{ ssi.headers.rightnav }}" 
-->{% endif %}
   <div id="content">
     {% block legacy %}{% if ssi.headers.legacy %}<div class="legacy">{{ 
ssi.headers.legacy }}</div>{% endif %}{% endblock %}
     {% block title %}{% if headers.title %}<h1 class="title">{{ headers.title 
}}</h1>{% endif %}{% endblock %}
     {% block content %}{{ content|markdown }}{% endblock %}
   </div>

<!--#include virtual="{{ ssi.headers.footer }}" -->

</body>
</html>

Headers from existing html are pulled using the following from 
ooo/ooo-site/trunk/lib/view.pm

     if ($args{content} =~ 
m!<head.*?>(.*?)</head>(?:.*?<body(.*?)>)?(.*?)(?:</body>|\Z)!si) {
         @args{qw/header bodytag content/} = ($1, $2, $3);
     }

(Note I do need to update<body>  above to include any "bodytag")

As Joe suggests we could grab everything before the<html>  and include it in the 
template. Is that appropriate? Does the use of SSI mean we need to use a different doctype? 
Please advise so that we can make the appropriate change with only one last 
"sledgehammer".

Regina mentioned the validator at W3C. With a quick test:

http://validator.w3.org/check?uri=http://www.openoffice.org/index.html
http://validator.w3.org/check?uri=http://www.openoffice.org/news/index.html
http://validator.w3.org/check?uri=http://www.openoffice.org/download/other.html

you can see that there is much to do if we want to get back to a green status (and I really hope that we want to). I've not checked the errors and warnings but I think many changes have to be done centrally, so IMHO in the templates/skeletons.

Marcus

From: Regina Henschel<[email protected]>
To: Apache OpenOffice.org dev<[email protected]>
Sent: Tuesday, March 13, 2012 4:36 PM
Subject: Doctype of websites

Hi all,

I just adapt the page 
http://ooo-site.apache.org/de/about-ooo/about-mailinglist.html about mailing 
lists to the new situation.

There I come across following problem:

The pages at http://de.openoffice.org for example
http://de.openoffice.org/foren.html
http://de.openoffice.org/about-ooo/about-mailinglist.html
have the correct doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";;>

But the pages at http://ooo-site.apache.org/de
for example
http://ooo-site.apache.org/de/foren.html
http://ooo-site.apache.org/de/about-ooo/about-mailinglist.html
have the wrong doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";;>

And I do not know the difference between
http://ooo-site.apache.org/de/about-ooo/about-mailinglist.html
which I edit, and
http://de.openoffice.org/about-ooo/about-mailinglist.html
which shows the version before my edit.

Can someone explain it to me?

Kind regards
Regina











--

Ciao

Marcus

Reply via email to