Re: beware: herein demons lie with JEditorPane

From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 07/06/04


Date: Tue, 06 Jul 2004 18:15:50 GMT

On Tue, 06 Jul 2004 15:54:01 GMT, "VisionSet" <spam@ntlworld.com>
wrote or quoted :

>So you mean HTML support in Java only accepts valid HTML?
>That seems like the right approach to me.

It greatly adds to the complexity of the rendering engine to allow
invalid HTML.

The problem you have in ordinary browsers is people test with IE which
is very forgiving, but then the HTML does not work other places.
Competition leads to greater and greater sloppiness, and more and more
overhead in browsers to deal with crap.

Inside Java, you don't have to deal with invalid HTML. So it makes
sense to have a streamlined engine that works only with validated
HTML. The catch is there is no easy way to run a validator on all the
HTML embedded in a Java program. Much of it does not even exist until
run time.

When Jesus comes, the first thing He will do is legislate a compact
binary format for HTML that is free from Error.

-- 
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Relevant Pages

  • Re: Adding and deleting elements from a Textbox Array
    ... The result of your script is that some HTML is injected into a DIV that is a child of a UL element. ... The HTML for the LI elements gives them all the same ID, which is further invalid HTML. ... But the object is not an array. ... var inp = document.createElement; ...
    (comp.lang.javascript)
  • Re: Browser mouse pointer location?
    ... other day was defending using invalid HTML to make form margins go away? ... I saw nothing invalid in my HTML. ... I wanted to measure pixel distances on the screen. ... I got a couple of excellent answers, couldn't have asked for more/better, but some people instantly jump in with "Why would you want to do that?", then start criticising other peoples motives, which leads to threads which degenerate into mud-slinging. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Should HTML entity translation accept "&amp"?
    ... but correct HTML will be processed correctly. ... That's good advice for a library function. ... invalid HTML, John is left in the painful position of having to write ...
    (comp.lang.python)
  • Re: THANK YOU! "button" vs "submit"
    ... A form can't be a child of a TR element, the HTML is invalid. ... Depends on how your document defines "invalid HTML". ... inference of a bespoke transitional DTD slipped by completely unoticed. ...
    (comp.lang.javascript)
  • Re: Recommendations for a web application framework?
    ... Yet I still see this duality wherein there's a Java class representing the form. ... you can not eliminate this duality if you want to use HTML templates and insert a value into a specific position in the template. ... To be perhaps a little clearer, what JSF does is ensure that the correspondence between identifiers and names in Java code and HTML content is one-way. ... Java may have a verbose syntax, but it's still much better than XML, especially with a decent IDE. ...
    (comp.lang.java.programmer)