Tommy Thorsen ha scritto:

For the record, the following markup:

<!doctype html><body></br>

results in:

<html>
   <head>
   <body>
      <br>

with the current algorithm, because the "in body" insertion mode treats </br> as if it was a <br>.

Maybe not fully in topic.

Section 4.5.3 says,

"|br| elements must be empty. Any content inside |br| elements must not be considered part of the surrounding text."

The first part is clearly an authoring rule. But the second part cannot be such as well clearly, because an author might feel that as a reference to a parsing rule discarding anything like <br>Something</br> (but it isn't). Yet, that can't be a parsing rule, since in contrast with the "in body" insertion mode (but not only that), which would turn it into <br>Something<br>, thus presenting the content to the end user (and obviously that's unlikely anyone visiting a web page would check the html code looking for content to ignore :-P). For the purpose of validation, the first part should be enough (that is, when a </br> end tag is found, an error may be prompted to the author). Perhaps, should the second sentence be modified with references to scripts (e.g. to tell it is wrong to use a br .innerHTML or .appendChild() to modify the document) and to styles (e.g. to tell it's wrong to expect any font property will affect the sorrounding text), to make it more clearly an authoring rule? Or perhaps changed into an exemple of bad markup? Or removed, if source of confusion with parsing rules?

Otherwise, I don't follow its meaning (perhaps I'm the only confused one). I mean, as far as I know, xml derived languages require a closing tag for every elements, while html has never had such requirements per se, but that's a matter of syntax, not semantics. And, semantically speaking, whatever (but a closing tag) follows an element which can't have children, in the markup, obviously consists of one or more siblings of such element, while its closing tag (again, that's syntax), if misplaced, or not provided for by syntax rules at all, causes a parse error (which may, or may not, be handled gracefully by the u.a., that's a matter of parsing rules). That is, declaring an element as "empty" should imply per se that the element cannot have any descendant, so its content is not... its content, but a syntax error. Perhaps, defining the empty content model such way might avoid misunderstandings. Or am I making some mistakes?

Best Regards, Alex.


--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP 
autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
RC Auto?
* Con Direct Line risparmi oltre il 30% sulla tua polizza! In più per te, 15% di extra sconto! Scopri subito l’offerta! * Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8496&d=4-12

Reply via email to