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

[wml] e) or f) : unknown tags parsing



On Mon, 29 May 2000, Denis Barbier wrote:

> On Mon, 29 May 2000, Tobias Oetiker wrote:
> 
> > *> > 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.
> > 
> > in xhtml it is invalid to have lone tags like <BR> or <HR> they
> > musst be called <BR/> and <HR/> resectively ... this makes the
> > parsing much simpler because there is nomore ambiguity ... I guess
> > it would be nice to have this functionality in mp4h (as a startup
> > option)
> 
> it has some dirty implications:
>   <simple-tag ...some code with brackets... />
> would be valid whereas
>   <complex-tag ...same code... >...</complex-tag>
> is not.

Tobias told me i misunderstood his point, here is some clarification.
He requested that unknown tags are parsed according to xhtml rules, i.e.
they are complex unless a trailing slash appears in attributes list,
in which case it is a simple tag.

It sounds nice, but it breaks some constructs, e.g. navbar
definitions:
   <navbar:header><table></navbar:header>
   <navbar:prolog><td></navbar:prolog>
   ...
in which case HTML tags has to be protected, as with
   <navbar:header><'<table>'></navbar:header>
   <navbar:prolog><'<td>'></navbar:prolog>
or
   <navbar:header><mp4h-protect><table></mp4h-protect></navbar:header>
   <navbar:prolog><mp4h-protect><td></mp4h-protect></navbar:prolog>

So here are our choices:
  e) Unknown tags are always simple.
     Drawback: logical structure is not preserved, e.g.
        <lang:en: <b>This is a test</b>>
               has 4 attributes: <b>This, is, a, test</b>
      
  f) Trailing slash determines tag type.
     Drawback: in some situations, HTML tags must be protected.

Could anyone evaluate pros and cons and send feedback?

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