[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Idea of future enhancement of WML - Environment
- From: Franz Knipp <nospam@thanx>
- Date: Tue, 11 Apr 2000 11:13:13 +0200 (MEST)
Hello people!
In addition to the discussion about nested tags I want to send the
following proposal to the list.
By accident I had a similar idea like Xose Manoel Ramos, perhaps because
I'm in Spain at the moment ;-) (¡Saludas de Valencia a Galicia!) and I
sent it to Denis Barbier hours before reading his mail on the list.
I try to explain in short words:
+---------- explanation start
Environments: offer the same functionality like Containers with the
enhancement, that inside HTML tags are expanded different that outside, if
they are defined in that kind.
A short example:
<pic "maybe.png"> <!--- inserts a picture --->
<envtable> <!--- start of environment --->
<pic "other.png"> <!--- insert pictore according to the
surrounding environment --->
</envtable> <!--- end of environment --->
The picture "maybe.png" is inserted in a general way but the picture
"other.png" is inserted in a way that it fits the requirements of the
environment "envtable".
Why I don't want to define another tag like tablepic:
*) The form with the environments seems maybe more logic especially
with many defined environments.
*) In the case of file inclusion the included file maybe included in
different environments and is therefore handled in different
ways.
A possible implementation:
Because tag are only expanded in pass 2, only there must be made changes.
*) <define-environment name> </define-environment>
are the definition tags and can be handled in the exact same way like
<define-container></define-container>
*) <name> </name>
start and stops the environment name and should do the same like
containers, and in addition pushs and pops name at the environment stack
(IMO this should be realized as stack, not as variable).
*) ordinary tags inside of environments
[here are the changes] If the environment stack is empty, all is done in
the usual way. If not, the last pushed item is read and is appended in
front of the tagname, e. g. (:: is arbitary used as separator)
environment stack: envtable
<TD> => use <envtable::TD> if exists,
otherwise <TD>
What happens with environments inside environments (nested case)?
The strategy is the same, e. g.
environment stack: mypage, envtable (is the last pushed item)
<TD> => use <mypage::envtable::TD> if exists,
or use <envtable::TD> if exists,
or use <mypage::TD> if exists,
otherwise <TD>
The used tags and containers are defined in the usual way, only with the
environment_name:: prefix (and can be used in that way, too).
One special case: what happens, wenn I want to use the `original' <TD>
tag? AFAIK is there an escaping sequence defined yet (but I don't
remember), I'd suggest to use, e. g. <::TD>, in that case.
+---------- explanation end
As you see I outlined a possible implementation but due to much work with
my final year project, I'm not able to implement it by myself (but in a
few months I'd do it, if there is a positive response)...
Nice greetings,
Franz
--------------------------------------------------------------------------
Franz KNIPP +34 65 44 26 555
C/ Poeta Ricard Sanmarti, 4-10 E-46020 Valencia
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