Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re:x2 Perl Monks hypocrisy (;)

by grinder (Bishop)
on Jul 16, 2003 at 17:54 UTC ( [id://274954]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Monks hypocrisy
in thread Perl Monks hypocrisy

Note. In SGML, it is possible to eliminate the final ";" after a character reference in some cases (e.g., at a line break or immediately before a tag). In other circumstances it may not be eliminated (e.g., in the middle of a word). We strongly suggest using the ";" in all cases to avoid problems with user agents that require this character to be present.
As you can see, the semicolon is recommended, not required.

Sorry, I have to side with Wassercrats on this one. Just because you can, sometimes, doesn't mean you should. It is easy to get that semi-colon in there. I've known a number of browsers over the years that never rendered correctly an entity lacking a semi-colon. Either they let it go through textually, or ate the remaining characters up to the end of the line.

Even Mozilla had this problem up until a year or so ago. If you can count on a semi-colon being required you simplify the parsing greatly. Just because SGML says it's recommended that does not make a good basis for choosing to do so. SGML has all sorts of markup minimisation short cuts available, because at the time people were paid to key stuff in, paid by the keystroke and there were no fancy GUI editors around. And plus it's just more comfortable to be able to omit needless stuff.

This made the job of writing an SGML parser a Herculanean undertaking. James Clark is about the only person who really pulled it off.

A much more reasonable comparison would be to consider XML. There, the trailing semi-colon is mandatory. This is because Tim Bray and the team that created XML wanted something that was easy to parse. Easier than full SGML in any case, and in comparison to that they succeded admirably.

I realise that the problem is difficult for Perlmonks. It would be feasible to make sure that any HTML generated directly by Everything is well-formed, but this does not take into account what passes for HTML typed in by the site's population.

Argh, just thinking about &, &amp, & and R&D and what Everything makes of them makes my brain hurt :)

_____________________________________________
Come to YAPC::Europe 2003 in Paris, 23-25 July 2003.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://274954]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-25 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found