Re: [Htmlparser-user] Swing integration
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-04-04 02:26:47
|
Hi Craig, Thanks a lot for the post. Pls go ahead with your analysis. I will try to catch up this weekend. Regards, Somik ----- Original Message ----- From: "Craig Raw" <cr...@qu...> To: "'Somik Raha'" <so...@ya...> Sent: Tuesday, April 02, 2002 3:32 PM Subject: RE: [Htmlparser-user] Swing integration > Hi Somik, > > A quick excerpt from javax.swing.text.html.HTMLEditorKit javadoc - which > is the driver behind JEditorPane's reading and writing HTML > capabilities. > > --- > Extendable/Scalable > > To maximize the usefulness of this kit, a great deal of effort has gone > into making it extendable. These are some of the features. > The parser is replaceable. The default parser is the Hot Java parser > which is DTD based. A different DTD can be used, or an entirely > different parser can be used. To change the parser, reimplement the > getParser method. The default parser is dynamically loaded when first > asked for, so the class files will never be loaded if an alternative > parser is used. The default parser is in a separate package called > parser below this package. > > The parser drives the ParserCallback, which is provided by HTMLDocument. > To change the callback, subclass HTMLDocument and reimplement the > createDefaultDocument method to return document that produces a > different reader. The reader controls how the document is structured. > Although the Document provides HTML support by default, there is nothing > preventing support of non-HTML tags that result in alternative element > structures. > --- > > I may find some time to look into this as well, although I am not sure > how much it would fix JEditorPane's somewhat buggy HTML rendering > capabilities.... > > -craig > > > -----Original Message----- > From: htm...@li... > [mailto:htm...@li...] On Behalf Of Somik > Raha > Sent: 01 April 2002 05:28 PM > To: HTMLParser User List > Cc: HTMLParser Developer List > Subject: Re: [Htmlparser-user] Swing integration > > Hi Craig > Wow! Thats a great question. > Actually, I doubt if I could replace Sun Microsystems' code with > mine. I > dont think Java is that open (or is it ?) > However, we could think of writing our own adapter for the html parser > that > might plugin in some way... > I have never used Sun's html parser (If I had, I might not have > started > this project). > I will need to study Sun's parser before I can answer your > question.. > But there does seem to be some interesting possibilities. > > Regards > Somik > ----- Original Message ----- > From: "Craig Raw" <cr...@qu...> > To: <htm...@li...> > Sent: Monday, April 01, 2002 10:20 PM > Subject: [Htmlparser-user] Swing integration > > > > Has the HTML Parser been integrated into Swing's HTMLEditorKit to > > provide a better implementation of JEditorPane's HTML viewing > > capabilities? HTML Parser would need to replace > > javax.swing.text.html.parser.Parser, which is currently somewhat > buggy. > > Anyone tried this? > > > > -craig > > > > > > > > > > _______________________________________________ > > Htmlparser-user mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |