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

Re: [wml] Re: WML 2.0.1

On Fri, May 26, 2000 at 02:29:24PM +0200, Stefan `Sec` Zehl wrote:

> On Fri, May 26, 2000 at 10:20:21AM +0200, Tobias Oetiker wrote:
> > lets have an example .... <BLA></BLA> and <BLB></BLB> are complex
> > tags both defined in mp4h:
> I'll try.

Some expressions below are called either valid or invalid. This has
nothing to do with HTML or SGML syntax, it is just my idea of mp4h

> > 1) <H1>hello<BLA>hello</H1></BLA>
> Expand BLA and interpret H1 as text.


> > 2) <BLB>hello<BLA>hello</BLB></BLA>
> Expand BLB, and don't expand BLB. Alternatively, print an error because
> BLA is not terminated within BLB.

Hey Stefan, you have only one choice ;-)  Otherwise grammar will be
somewhat obfuscated.

Invalid: `</BLB> found where </BLA> is expected'
I believe that allowing wrong-nested tags does not help, it just makes
debugging harder.

> > 3) <BLA>hello</BLB></BLA>
> Error. BLB has no opening. Alternatively, interpret BLB as text.

Invalid: `</BLB> found where </BLA> is expected'
I would also suggest that
reports an error.

> > 4) <BLA><perl>print "<BLB>"</perl></BLB></BLA>
> Because perl is run after mhc, I'd either make <perl></perl> protect its
> interior from mhc, thus resulting in example 3. If you make
> perl-non-protecting, you expand both of them. <BLB> then has "</perl> as
> %body.

I do not like the idea of <perl>...</perl> protecting against expansion,
i worked hard to make Perl commands nestable ;-)
So i would say that this expression is invalid.

> > 5) <BLA><BLA><perl>print "</BLA>"</perl></BLA>
> same as above. Either you have one unclosed <BLA> or you get strange
> results %)
> > 6) <BLA <BLB>></BLB>></BLA> or <BLA <BLB>></BLB></BLA>
> expand BLA with argument <BLB> and %body </BLB>>

No, <BLB> alone does not make sense.

<BLA> has one attribute which is <BLB>></BLB> and an empty body.

> and
> expand BLA with argument <BLB> and %body </BLB>

Invalid: EOF when reading attributes af <BLA>

> both behave essentially the sames as (3)

Not really, as you see we do not have the same idea on how it must be

> > 7) <BLA <BLB></BLA></BLB>></BLA>
> Just pass "<BLB></BLA></BLB>" as parameter.

Huh, in 3 you say this expression is invalid.

Invalid: `</BLA> found where </BLB> is expected'

Denis Barbier
WML Maintainer
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com