Re: legality/practicality of nesting complete, valid HTML pages
- From: henry <henry.zzzabcde@xxxxxxxxx>
- Date: Wed, 19 Nov 2008 11:31:34 -0800
Let's relax, OK?
I hope there's room for all methods and all tools on this group. We each
pick the tools that works best for us, and live with the disadvantages, OK?
If this is a group ONLY for people who use text editors to author sites,
then I'd really appreciate it if someone would point me to an equivalent
group for people who use all kinds of tools.
Maybe I should have mentioned that I stupidly volunteered to take over an
existing site of several hundred really, really badly written pages. (Do
they validate? ROFL.) Totally un-maintainable. It's a public-service
job, I'm not getting paid -- I'll even be paying for hosting myself in the
future-- but there seemed to be no choice, otherwise some valuable
information was going to get lost. I had no idea what I was getting into,
and didn't discover it until I started a site-wide renovation.
Back to the technical points:
So far, no one has disagreed with the scheme of an "index.php" file that
sets the site look but contains no content. Pure content is contained in
multiple separate HTML-only files that are included in "index.php" per some
computation. Right? (I wish someone would give me a good name for this
design. I'd also like to get an idea of how commonly-used it is, and if
there are some good alternatives that accomplish the same result.)
It seems we all agree that it is _at least_ a Very Good Idea for all pages
to pass W3C validation. If so, it is totally clear that the included
content files ("chunks") must NOT contain header or trailer material.
I think that's the end of the discussion for you brave and skilled authors
who choose do the job with only a text editor and an ftp utility. I really,
honestly, truly admire you. I fully understand the advantages of using such
tools.
For those of us who have good reasons to use higher-level tools, we get the
advantages of doing so, but we need to learn to live with the disadvantages.
In this specific case, the advantage is being able to apply a site-wide
style to many items in content pages by using a simple pull-down. The
disadvantage is that the develop-time content of the content chunk files
needs to be different from the load-time content.
DW offers one solution. I feel it is a bit fragile. It would be helpful
for me to hear about solutions offered by other high-level tools, if any.
Or, I would like to hear that this issue is avoidable by using a different
design, as long as the content chunks are in separate files.
One reply offered an alternative of reading the content chunks into a buffer
at page-load time, cleaning the leader and trailer material at that point.
(Is there a commonly-accepted name for this method?) Without ever having
tried it, that method seems simple, robust, and flexible. Thinking out loud:
Check the first non-whitespace string. If it is "<!DOCTYPE..." discard
everything up to and including the "<body>" tag, then search for "</body>"
and discard that and everything to the EOF. If the first string is
something different, assume the file contains a fragment of "bare" HTML and
use it unchanged. So, in practice, what are the potential difficulties of
this approach? Off the top of my head, I'm thinking ... buffer allocation.
In response to a point someone brought up: DW creates new documents with
default header and trailer material per user preference settings. There is
probably a way to create a truly blank, i.e. totally empty new document, but
I haven't found it yet. It's easy enough to empty a new document.
Thanks,
Henry
remove 'zzz'
.
- Follow-Ups:
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Jonathan N. Little
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Ben Bacarisse
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Scott Bryce
- Re: legality/practicality of nesting complete, valid HTML pages
- References:
- legality/practicality of nesting complete, valid HTML pages
- From: henry
- Re: legality/practicality of nesting complete, valid HTML pages
- From: viza
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Jonathan N. Little
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Scott Bryce
- Re: legality/practicality of nesting complete, valid HTML pages
- From: Jonathan N. Little
- legality/practicality of nesting complete, valid HTML pages
- Prev by Date: Re: accessing websites...
- Next by Date: Re: legality/practicality of nesting complete, valid HTML pages
- Previous by thread: Re: legality/practicality of nesting complete, valid HTML pages
- Next by thread: Re: legality/practicality of nesting complete, valid HTML pages
- Index(es):
Relevant Pages
|