LISTSERV mailing list manager LISTSERV 15.5

Help for HTML-WG Archives

HTML-WG Archives

HTML-WG Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave HTML-WG
Reply | Post New Message
Search Archives

Subject: Repeated Controls (was: Future table issue)
From: [log in to unmask]
Reply-To:[log in to unmask]
Date:Tue, 8 Aug 95 20:18:13 EDT

text/plain (91 lines)

I'd like to come up with some kind of plan for solving this problem to ensure
that it is compatitble with the table spec.

The basic problem is defining a large control (usually a <SELECT>) once and
then using it repeatedly in the same document. The objective is to reduce the
size and redundancy of the document. A 10K select definition repeated in a
500 line table turns into a 5MB document.

Here's another try at a solution:

<!-- Define a control class -->
<!ELEMENT control.define - - (INPUT|SELECT|TEXTAREA) >
<!ATTLIST control.define
        name    ID    #IMPLIED  -- for naming control definition --

<!-- Instantiate a control class -->
<!ELEMENT control - O (#PCDATA) >
<!ATTLIST control
        def    IDREF    #REQUIRED  -- control definition to use --
        name  CDATA #IMPLIED       -- name for control when expanded --

<!ENTITY cellmenu "<select><option>A<option>B<option>C</select>">
<!-- Display of the control.define tag is suppressed -->
<control.define name=cellmenu>%cellmenu</control.define>
<tr><td><control def=cellmenu name="a">aaaa
<tr><td><control def=cellmenu name="b">bbbb
<tr><td><control def=cellmenu name="c">cccc
<!-- can be used outside of tables too -->
<control def=cellmenu name="x">xxxxxx

The idea is to define the control without the value attribute. The contents
of the CONTROL tag would then be used as the initial value. The control
instance name would be picked up from the CONTROL tag.

A more compact form that would require automatic control name generation:

<!-- use a range spec type element to set up a defaul -->
<RANGESPEC col=1 control.def=cellmenu>

Jon Smirl, [log in to unmask]

> How can this work with initial values? You need a macro expansion
> with a parameter. Can SGML do this?
> ><!ENTITY cellmenu(X) "<select
> >]>
> ><html>
> >..
> ><form>
> ><table>
> >..
> ><tr><td>&cellmenu("aaaa");
> ><tr><td>&cellmenu("bbbb");
> ><tr><td>&cellmenu("cccc");
> >..
> ></table>
> ></form>
> >..
> ></html>

Back to: Top of Message | Previous Page | Main HTML-WG Page



CataList Email List Search Powered by the LISTSERV Email List Manager