[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

wml + frames = ouch



I am personally deeply opposed to frames, but the people with the paycheck
(fortunately, this is just a contract job) asked me to do "the things with
the scrollbars", and so I pull up wml and wonder how am I going to do
this.

My original scheme was the two-table-cell approach to navigation: some
list of places to go (which, for me, changes depending on where you are)
in the left table cell (~33% of the screen), and actual content goes on
the right.  They wanted the left cell in a frame, so it would stay put.
Growl.

What I basically came up with is a post-processing.  WML generates all its
stuff into a file structured like so.  Instead of a properly-formatted
html file with tables, I have a file that might look like:

---8<---
This is the title for the web browser, one line
[navigator stuff goes here, multiple-lines]
BEGIN-CONTENT!
[content stuff goes here, multiple lines]
---8<---

My postprocessing splits this into material for frames, noframes, with
server-including to link it all.  Let's say that our structured file
filename.html came from filename.wml. After post-processing by perl, we'll
have the following four files newly created:
	filename-nav
	filename-content
	filename-nav.html
	filename-content.html

The first two contain, respectively, the left and right table cell
contents; the next two are corresponding files that server-include the
corresponding "cell", but formmated wihtin HTML so that it can be referred
to from a <frameset>.

Finally, my post-processor overwrites filename.html with a <frameset> page
which refers to the filename-*.html files above, and in the <noframes>
context creates a table which server-side includes the filename-nav and
filename-content sections.

So, after processing I have:

filename.html:
HTML
 HEAD
  STYLESHEET
 FRAMESET
	frame #1: source=filename-nav.html
	-> "filename-nav.html" server-includes "filename-nav"

	frame #2: source=filename-content.html
  	-> "filename-content.html" server-includes "filename-content"
 /FRAMESET
 /HEAD
 NOFRAMES, BODY, TABLE, TR, TD
	server-include "filename-nav"
 /TD, TD
	server-include "filename-content"
/TD, /TR, /TABLE, /BODY, /HTML

Examples:
http://www.truespectra.com/~svanegmo/pic/index.html
http://www.truespectra.com/~svanegmo/pic/index-nav.html
http://www.truespectra.com/~svanegmo/pic/index-content.html
http://www.truespectra.com/~svanegmo/pic/index-nav
http://www.truespectra.com/~svanegmo/pic/index-content

Source:
http://www.truespectra.com/~svanegmo/pic/index.wml

Question:
Can anybody think of a *better* way of doing this.  My make process
amounts to:
	rm *.html
	wmk -fs
	frameify *.html

Which is only a trade-off in maintenance time.  I lose a bit of wml's
features on the encpsulating HTML, but none of it is especially complex. 

Note that the files on the web right now may not be quite right; lynx
likes them, and that's all I know.

/Steve
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com