Re: folding elements

Pei Y. Wei (wei@xcf.Berkeley.EDU)
Fri, 25 Mar 1994 01:26:48 --100

Dave Ragget writes:

> Surely this is a sufficiently general mechanism which should apply
> to other elements e.g. OL, DL, FORM and DIVn ?

Oh I agree. The reason for prototyping this on <UL> is just b/c lists
are particularily amendable to be folded.

Then Chris Wilson writes:

> This was my initial thought also - wouldn't it make more sense to have an
> enclosing <FOLDED> tag (or something like that), with an ALT attribute for
> the text to use when folded? (Or TEXT, TITLE, whatever.) It seems that if
> the leap is going to be made to expandable/compressible sections of HTML, it
> should not be limited to just ULs.

That was my initial thought as well, to use a <FOLDER> tag, so that
anything contained in <FOLDER> can be folded away. But early discussion
with someone at ORA (Terry Allen) convinced me that it's better to use
attributes. The factors were (not in any particular order):

* This is more of a presentation issue, and if this can be hinted with
attributes that browsers can easily ignore, just use attributes.

* Implementation wise (in viola anyway), it is easier to use the one
<FOLDER> tag, rather than stick the folding logic into every sensibly
foldable elements. But using the extra tag inccurs more house keeping
resouces (violaWWW keeps lots of information about the elements, so
that the document can be reversed back to HTML... Not an apparently
useful feature now, but later...).

* When the stylesheet thing comes along, the folding infomation should be
describable in the stylesheet. When that happens, the extra tags will
probably be extraneous.

* Less HTML mark up to write, in using attributes rather than an enclosing
tag. Could be pretty messy if you're dealing wiht.

* Some other DTD related arguments which ezcapes me now.

Lou Montulli writes:

> If we go with this I would rather see the syntax as:
> <UL FOLDED=NO LABEL="W3 Designs">
> <LI>Stuff a.
> [...]
> This would allow multiline labels, entities and images.

Good point... How about the following revision:

<LI>Stuff a.

Bert Bos writes:
> ...
> Maybe folding isn't even the only thing we can do to elements. A few
> suggestions (some rather pointless, I admit): assume an attribute
> - "STACKED": the subelements are cards in a 3 dimensional pile
Actually came close to doing this :)

Frans Van hoesel writes:

> I think it is not a good idea, because it lacks general usage.
> better is a general way of including any URL inside the document;
> more like
> the plane was a boeing 747
> <src="URL">detailed description</a>
> bla bla
> perhaps better is to have
> <html src="url"> for using elements with possible delayed loading.
> that makes sure that the browser can see the difference between
> <img src="url">
> and can display the delayed element differently.
> (otherwise it would have no way of knowing what type of
> element would be returned via the url (img/text) on beforehand)

This is a valid concern, which is why I mentioned that ``perhaps later
we can put HREF or SRC into <UL>'', etc. But the thing is, for lots of
cases, it's a bit too tedious to do includes, when all you want is
to visually fold some text out of the way.

But I agree that being able to do generalized includes would be very
useful. FYI, ViolaWWW already has an <INCLUDE> tag (for the client,
not to be confused with the server interpreted <INC>) for just this
situation. Although, it'd be even more useful if <INCLUDE> is made

Like, <INCLUDE SRC="a_quote.html"> which automatically gets fetched
and expanded; and the user triggered version:
<INCLUDE SRC="a_quote.html" FOLD=YES LABEL="A quote from Carl Jung">
or I guess:
<INCLUDE SRC="a_quote.html" FOLD=YES><LABEL>A quote from Carl Jung</LABEL>