[Zope-dev] HiperDOM & xmlc
Dieter Maurer
dieter@handshake.de
Sun, 17 Sep 2000 06:49:05 +0200 (CEST)
Shane Hathaway writes:
> lalo@hackandroll.org wrote:
> > The only thing I _don't_ feel good about this kind of template
> > is that, in practice, we will probably lose the benefits of
> > things like <dtml-var standard_html_header> - meaning, when you
> > want to change the header of your site, you'll have to edit all
> > your templates.
>
> I agree this is a problem, and speaking from experience, changing all
> templates is not an acceptable compromise. For www.zope.org that would
> mean including the standard template in nearly every page, everywhere,
> because the pages on www.zope.org are nearly all "templates"
> themselves. We would lose one of the primary benefits of Zope.
>
> Another unacceptable compromise is including a variant of
> standard_html_header and _footer on every page (as is done now). One
> reason is because it is not possible to write
> standard_html_header/_footer using well-formed XML. The header begins
> the "html" tag, while the footer ends it. In fact, most sites these
> days put the beginning of a table in _header and the end of the table in
> _footer. Objects containing non-well-formed XML aren't compatible with
> a DOM-based solution.
>
> This has been one of the points of discussion here at DC. The only
> reasonable solution we've come up with is automatically wrapping the
> results of the rendering in an acquired object with a fixed name such as
> standard_page_template.
>
> The other solution that I have tried to wrestle with is introducing some
> kind of multiple view system with automatic selection of the default
> view. But in reality, the standard_page_template solution would make
> the multiple view system possible as well.
>
> So what does everyone think? Is standard_page_template the right thing
> to do? Is there a better way? Help!
I did not (yet) look at HiperDOM and xmlc. Nor am I familiar
with dreamweaver and friends.
Thus, maybe, I should not speak up.
If one is really interested in a separation of content and
presentation (which I feel is good), then the "standard_html_*"
were wrong in the first place. It forces the
content author to prepare for presentation.
The "page_template" proposal is much better in this respect,
as it is external to the content.
Of cause, there should be a way to select between different
page templates and not be bound to a fixed template (already
mentioned by a previous responder).
The other question deals with template modularity.
If a single modification should influence several templates,
then this is best addressed by building the templates out of
modules. The modification of a module then affects all
templates that use it.
Modularization would be possible if e.g. XSLT is
used for presentation. I do not know, whether Dreamweaver
has a modularization concept. I hope so.
The current "header/footer" fragments are not optimal wrt.
modularization, as tightly coupled stuff ("footer" must close
everything that "header" opened) is separated into
different objects. It is much better to have a module
that contains both the page prolog and epilog
and a placeholder for the actual content, maybe filled in with
sample text that later is replaced by the content, i.e.
a page template.
It is good that you are forced to use well formed XML
in your modules.
Dieter