W3C home > Mailing lists > Public > www-html@w3.org > February 2000

Re: Seperating Document Content from Structure (was RE: inline CSS - score so far)

From: Walter Ian Kaye <walter@natural-innovations.com>
Date: Thu, 24 Feb 2000 00:29:54 -0800
Message-Id: <v04220802b4da95e5e894@[]>
To: www-html@w3.org
At 11:37a -0600 02/23/00, David Wagner didst inscribe upon an 
electronic papyrus:
>I hope this clarifies the question.  What do y'all think?  Is seperation of
>structure, content, and style a Good Idea? -David

In fact, it's often necessary. (btw, that's sepAration...;)

><!-- Straw fragment of HTML with content seperated from structure. -->
><style type="text/RobustStyleSheet">
>.warning {background-color:yellow;color:magenta;}
>/*Selectors apply styles to classes, elements and parts of
>   specific elements, as in the following nonsyntactical example.*/
>   ThirdThroughFifthWordOfSecondSentanceOfP#002 {font-weight:bold;}
><h1 id="title" src="dbquery0#record001"/>
><h2 id="sec001" src="dbquery1#record001"/>
>  <p id="p001" src="dbquery2?sec=001#record001"/>
>  <p id="p002" src="dbquery2?sec=001#record002"/>
>  <p id="p003" src="dbquery2?sec=001#record003"/>
><h2 id="sec002" src="dbquery1#record002"/>
>  <p id="p004" src="dbquery2?sec=002#record001"/>
>  <div class="warning">
>   <p id="p005" src="dbquery2?sec=002#record002"/>
>   <p id="p006" src="dbquery2?sec=002#record003"/>
>  </div>
>  <p id="p007" src="dbquery2?sec=002#record004"/>

But how can the file know how many records (or whatever items) there will be?

At 01:06p -0500 02/23/00, Patrice Calve didst inscribe upon an 
electronic papyrus:
>As you can imagine, if you change the look of one page, you can't simply ask
>the artist to poke around in the DLLs and the ASP files.  Big Problem:  How
>to merge a new look with the existing code.

You also can't ask copy-writers to muck with even simple HTML (but we 
all try to help them learn some basic HTML anyway...;).

>The earlier approach was to have an artist/designer creat a dummy web page
>in HTML, programmers converted it to ASP (microsoft IIS) and probably use
>DLLs for managing the data, depending on the size and speed of the site.

Eeesh. What I do is create an HTML template file (I like to use 
*.htpl as a naming convention) and put placeholders in it:



blah blah blah


Then a Perl CGI slurps the file into a variable, does some s// on the 
placeholders, and serves the result.

$html =~ s/`FOO/$foo/g;
$html =~ s/`BAR/$bar/g;

Clean and simple. HTML remains pure HTML, and the web designer can 
easily modify the template file without seeing any programming code 
at all.

Received on Thursday, 24 February 2000 03:30:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:53 UTC