[Zope-dev] RE: Eliminating forced HEAD/TITLE/BASE HREF

Tom Neff tneff@bigfoot.com
Tue, 7 Dec 1999 11:35:07 -0500


I found my own way, on a hunch.

If you place this string at the top of a DTML Method:

	<!-- <html><head><title>dummy</title></head><base href="dummy"> -->

i.e. a minimal set of head tags *enclosed as a comment*, then this is enough
to satisfy the primitive search expression in HTTPResponse.py that all is
well and nothing else need be added, so your Method contents (after
executing any actions) are sent as is.

The commented tags *will* still be emitted, so a careful HTML source
observer will see fossil page traces, but they have no syntactical meaning
or effect.  In particular, your enclosing page will syntax check cleanly - a
point of keen interest to some of us.

I hope this may be of use to some.  I realize it is more of a use than a
development issue, but the people who made such a subterfuge necessary hang
out here, so I thought it worth the report.

-----Original Message-----
From: Tom Neff [mailto:tneff@bigfoot.com]
Sent: Tuesday, December 07, 1999 2:45 AM
To: zope-dev@zope.org
Subject: Eliminating forced HEAD/TITLE/BASE HREF


I need to use Zope output in a server-side include on another machine that's
not running Zope.  Has anybody come up with a reasonably clean way to
suppress the enforced emission of the opening HTML, HEAD, TITLE and BASE
HREF tags?  It is rather frustrating, given the package's great
sophistication otherwise, that one doesn't have control over those odd bits
of HTML.  I looked at the Python code but it seems to be the usual
multilayered marvel and I can't quite see where to put the scalpel.  Any
assistance appreciated.