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

Re: [wml] Re: c) or d)



On Sun, 28 May 2000, Tobias Oetiker wrote:

> Yesterday you sent me mail regarding [wml] Re: c) or d):
> 
> *> > 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
> *> closed.
> 
> the point here is about 'ignoring invalid syntax'. If you 'close
> first' then the the parser sees <blb> but the </bla> is more
> powerfull in closing ... and thus the parser irnores <blb> as
> obviously not being the <blb></blb> pair it expected ... same goes
> for the </blb> at the end which also gets ignored as being a lone
> tag which does not make sens ...

Alternatively, <bla><blb></bla> is expanded and scanned in turn, parser
finds <blb></blb> and expands it.  This is why i said it is valid (i.e.
parsable) with case (c).

> I maintain that I think wml should parse all tags and the
> definition for unknown tags is that they reinsert themselves ... 

That's also my point of view.

> In connection with xhtml it might be nice to be able to tell mp4h
> to barf on lone <ddd> tags (they should be <ddd/>) ...

What does this verb (`to barf on') mean? My English-French dictionary
and babelfish do not know it.
FYI mp4h recognizes this syntax.

> The only thing which we then need todo for 'magic' stuff where
> part of the html tags get generated by perl is a simple 'mp4h quote
> tag' which disables mp4h parsing for a stretch of text ... I know
> that I can use <protect pass=2> for this but a simple tag pair like
> <' '> would make it simpler .... 

I roughly agree, but we have to choose delimiters which cannot appear in
Perl code (and in most other programming languages). These lines may
appear in Perl code:

   print <<'EOT';                       # is never ended
or
   open ('> /tmp/foo.$$');              # premature end of quotes

There is no simple solution, protection cannot be automatic, and user
must understand what he does.

-- 
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