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

Re: WML 2.0.1



Hello Denis! Hello folks!

On Mon, 29 May 2000, Denis Barbier wrote:
> Franz, could you explain what you dislike in WML 2.0.1?

That it breaks a lot of perl constructs in my scripts ;-)

> My comprehension of recent discussions is that mp4h acts like we want.
> As my point of view is certainly biased, it would be useful if someone
> else coordinates this discussion and writes a resume of which syntax we
> want for mp4h.

I'll describe what I want:

(1) As explained yet, mp4h shouldn't be program which has to correct HTML
syntax. 

(2) IMO it should do exactly one job: Expanding mp4h commands!

(3) This means, that e.g. 

<aaa> is a tag defined by <define-tag>
<bbb> is a complex tag defined by <define-tag endtag=required>

(a) <IMG src="foo.png"> has not to be tokenized because there is no
mp4h-command inside.
(b) <bbb><IMG src="foo.png"></bbb> The same as (a). The body is inserted
without altering it.
(c) <IMG src="<aaa>"> <aaa> is substituted by the output of the tag
(d) <: print "<IMG src=\"foo.png\">"; :> has not to be altered because
there is no mp4h command (like (a)).
(e) <: open(FH, "< file") :> like (d)

(4) As consequence I see no necessary to make a special protection
mechanism inside of mp4h to protect perl constructs - as long as there are
no mp4h commands, mp4h should be totally transparent (and should \" leave
intact)

(5) About tokenizing: I'll explain my ideas (which are simply the
behaviour of MetaHTML and seem logical to me):

(a) <ifeq 0 0 "<bla><bla><bla "foo"> <blb></blb>">
     0000 1 2 "333333333333333"444"5555555555555"

Because there is no whitespace character between 3, 4 and 5 it's treated
as one token: output: <bla><bla><bla foo> <blb></blb>

(b) <ifeq 0 0 "<bla><bla><bla "f o o"> <blb></blb>">
     0000 1 2 "333333333333333"4 5 6"7777777777777"

3 and 4 is grouped together, 5 is the else-branch, 6 and 7 are grouped
together. output: <bla><bla><bla f

(c) <ifeq 0 0 <bla><bla><bla "f o o"> <blb></blb>>
     0000 1 2 33333444445555555555555 66666777777

3, 4 and 5 are interpreted as one token because there's no whitespace
character inbetween. 6 and 7 is the output in the case of else.
output: <bla><bla><bla "f o o">

(d) <ifeq 0 0 <bla <blb>">"</blb>> <bla "foo">>
     0000 1 2 33333333333333333333 44444444444

The > inside of 3 is not interpreted because it is in ".
output: <bla <blb>">"</blb>>

(6) Let's try to find some rules to explain this behaviour - mmh:

(a) A token may start with an left square bracket (<), its end is the
corresponding > (and not always the next)
(b) A token may be enclosed in double quotes(")
(c) Tokens without whitespace between them are grouped together and
handled as one token
(d) Tokens are strictly nested - an inner token cannot break up an outer
token (see case 5 (d))

(7) What else?

I hope you understood my horrible English and my ideas of mp4h. I'm very
happy with the new possibilities and use the A and U modifiers of %body
and %attributes extensively - in the moment, that WML2 is `stable' (so
that I don't have to change my templates any more), I'll show you some of
my works.

Greetings from Spain,

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