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

Re: Idea of future enhancement of WML - Environment



Hello folks!

First of all: Congratulations to family Engelschall!

On Sat, 24 Jun 2000, Denis Barbier wrote:
> i do not like this idea, because it is very confusing. And i could not
> imagine the benefits of this approach. Could you send a nice example?

Ok - I'll try:

Imagine the following tags, defined by <define-tag>:

<red:text>
<red:box>
<red:picture>

<blue:text>
<blue:box>
<blue:picture>

Further we think of the following complex tags:

<red>
<blue>

The following is an example of a wml page:

<red>
<red:box>
<red:text>This is a little text</red:text>
</red:box>
<red:picture src="foobar.png">
</red>

<blue>
<blue:box>
<blue:text>This is another text</blue:text>
</blue:box>
<blue:picture src="foobar.png">
</blue>

**** And now the proposed changes:

<red> and <blue> are defined as so-called environments. That means (in a
LaTeX-thinking way), that inside of an environment the meaning could be
different. The previous example could be written with <red> and <blue>
defined as environments:

<red>
<box>
<text>This is a little text</text>
</box>
<picture src="foobar.png">
</red>

<blue>
<box>
<text>This is another text</text>
</box>
<picture src="foobar.png">
</blue>

This way we can offer a syntax more like OOP - the name of the `methods´
(<box>, <text>, <picture>) remains to be the same in different `objects´
(<red>, <blue>).

Do you get the idea? I see a lot of benefits (smarter writing, changed
behaviour depending on the context, ...) and no disadvantages (because it
is fully backward compatible).

Greetings from Austria,

Franz

--------------------------------------------------------------------------
Franz KNIPP                                       Mobil: +43 676 485 95 50
A-1180 Wien, Gentzgasse 129/1/5, Austria            TEL: +43  1  478 18 01
http://www.knipp.org/franz/                                franz@knipp.org
--------------------------------------------------------------------------
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com