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

Re: c) or d)

On Sat, May 27, 2000 at 07:47:16PM +0200, Denis Barbier wrote:
> > > > > 6) <BLA <BLB>></BLB>></BLA> or <BLA <BLB>></BLB></BLA>
> > I don't think so. It would be violating POLA. A tag should close with
> > the first 'available' >.
> What is POLA?

"Principle of least astonishment"

> > <BLA <BLB>> Is clearly BLA with attribute <BLB> no matter what follows.
> I strongly disagree.  In my mind innermost tags must be closed first.
> So here is another question, which one is preferred?
>  c) first open, first close
>  d) last open, first close

Oh, so now I understand your way of parsing that line.

If anything, this makes a strong point of disallowing 'stray' >

> My preferred one is (d) (and to be honest i never thought of (a) before)
> because it prevents nesting problems, e.g.
>   <define-container bla>%body</define-container>
>   <bla><blb></bla></blb>
> is valid with (c).

Why should it be more or less valid in case c and/or d? If both are
containers, this line is simply incorrect. Either you start matching the
<bla> with the </bla> and notice that <blb> is not closed. Or you Start
with <bla>, recurse into <blb>...</blb> and notice that <bla> is never

> And it allows
>   <define-tag foo>
>     Before definition: <bar>
>     <define-tag bar>
>       baz
>     </define-tag>
>   After definition: <bar>
>   </define-tag>

Hm. Thinking my way the first </define-tag> would end the outmost
<define-tag>. Yes. I can see your point. I agree that d) ist most
probably better for this :)

UNIX for the masses: <!--#exec cmd="/vmunix.cgi" --> -- Seen in the sdm.
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com