[Zope] Stripping HTML tags or not [WAS: (something like) making static pages dynamic] dynamic]

Albert Kinderman albert.kinderman@csun.edu
Wed, 13 Oct 1999 04:37:41 -0700


A recent discussion on the list concerned how to strip the usual tags
from the beginning and end of a static html document produced by a
wysiwyg editor and replace the tags with the standard_html_header and
standard_html_footer.   On my site, my standard_html_headers and
standard_html_footers are customized to the type of document, so that I
have created a ZClass for each type.  Each ZClass is a folder and has an
index_html 

<dtml-var standard_html_header>
<dtml-var content>
<dtml-var standard_html_footer>

so that the content managers only have to upload the content and not
worry about the headers and footers.  Within this context, if a manager
uses Netscape Publisher and publishes, for example, to
http://mysite/Zope/../(ZClassInstance)/content, 
content will contain the set of tags produced by Publisher.

At this point, the source of a rendering of the document will contain
two sets of <head>, <body>, etc. tags.  However, in Netscape Navigator,
the extra tags seem to be ignored and the page appears the same as if
the extra tags have been stripped out.

This raises several questions:

1) Does the HTML standard say that browsers should ignore the extra
tags? 

2) If not, do all or most other browsers ignore the extra tags anyway?

If the answer to either question is yes, then as a practical matter it
is not necessary to strip out the extra tags as long as the
standard_html_header and standard_html_footer enclose them.

I should note that in my case the standard_html_header sets up a table
with a side bar in the first column so that content is inside a table
element.  I don't know if the extra tags would be ignored under other
conditions.

Al 

-- 
Albert Kinderman             California State University, Northridge
Department of Management Science           albert.kinderman@csun.edu