Re: [Htmlparser-developer] RE: [Htmlparser-user] Swing integration
Brought to you by:
derrickoswald
|
From: Somik R. <so...@ya...> - 2002-05-08 11:17:08
|
Hi Craig,
You are now on the developer team.
> For the handleSimpleTag, I'm thinking the only way to do this is to
> maintain an internal tag buffer and callback only once the entire
> document has been parsed and the end tags have been found. Its not
> ideal, but you have to be able to deal with <p> and <p> </p>.
Hmm - I am using a very similar approach - check the code and the
explanations that I sent earlier.
I dont know what the parser is doing with <p>, it will be interesting to
find out.
Cheers,
Somik
----- Original Message -----
From: "Craig Raw" <cr...@qu...>
To: <htm...@li...>
Cc: <so...@ya...>
Sent: Wednesday, May 08, 2002 7:38 PM
Subject: [Htmlparser-developer] RE: [Htmlparser-user] Swing integration
> Thanks, Somik, I'm on the user and dev lists now, and its coming through
> fine. My SourceForge ID is 538740, username 'craigra'.
>
> For the handleSimpleTag, I'm thinking the only way to do this is to
> maintain an internal tag buffer and callback only once the entire
> document has been parsed and the end tags have been found. Its not
> ideal, but you have to be able to deal with <p> and <p> </p>.
>
>
>
> -----Original Message-----
> From: htm...@li...
> [mailto:htm...@li...] On Behalf Of Somik
> Raha
> Sent: 08 May 2002 12:13 PM
> To: htm...@li...
> Cc: Craig Raw
> Subject: Re: [Htmlparser-user] Swing integration
>
> Hi Craig,
> I actually replied to you on htmlparser-developer, your earlier
> mails
> went there. Are you on that list ?
> Am attaching the relevant mails to this mail - hope it goes thru.
> Regards
> Somik
> ----- Original Message -----
> From: "Craig Raw" <cr...@qu...>
> To: <htm...@li...>
> Cc: <so...@ya...>
> Sent: Wednesday, May 08, 2002 6:49 PM
> Subject: [Htmlparser-user] Swing integration
>
>
> > Posted this earlier, seems to have got lost....
> > ----
> >
> >
> > Hi Somik,
> >
> > I'm looking into the HTMLParser-Swing integration again, and I have
> two
> > questions:
> >
> > 1. The HTMLEditorKit.ParserCallback takes a position with most of its
> > callback functions. Can this position be extracted from the HTMLTag's
> > elementBegin()?
> >
> > 2. There is a need to differentiate between a callback to
> > handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) and
> > handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) when
> > iterating through the HTMLTag elements Enumeration. How?
> >
> > You mentioned you have started an implementation - if you have a
> > framework going, I'd be happy to continue with the donkey work. I
> really
> > think this could make Swing's HTML rendering a lot more stable.
> >
> > Regards,
> > Craig
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Somik Raha [mailto:so...@ya...]
> > Sent: 16 April 2002 04:57 AM
> > To: htm...@li...
> > Cc: Craig Raw
> > Subject: Re: [Htmlparser-user] Swing integration
> >
> > Hi Craig, Asgher
> > I finally had the time to check Swing integration. Boy - the
> parser
> > design in Swing sucks!! Theoretically its possible to do it - and I
> got
> > started, but just realized that in order to be compatible with swing
> > objects
> > that do compile time type checking with a particular tag, I have to
> > actually
> > have 73 if statements to give the right tag to the callback.
> > I have more important things to do at the moment, but probably
> will
> > get
> > back to this donkey work. *sigh*
> >
> > I am thinking we should make release 1.1 and then try this. Any
> > suggestions ?
> >
> > Regards,
> > Somik
> > ----- Original Message -----
> > From: "Somik Raha" <so...@ya...>
> > To: <htm...@li...>
> > Sent: Thursday, April 04, 2002 11:20 AM
> > Subject: Re: [Htmlparser-user] Swing integration
> >
> >
> > > 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
> > >
> > >
> > > _______________________________________________
> > > Htmlparser-user mailing list
> > > Htm...@li...
> > > https://lists.sourceforge.net/lists/listinfo/htmlparser-user
> >
> >
> > _______________________________________________________________
> >
> > Have big pipes? SourceForge.net is looking for download mirrors. We
> supply
> > the hardware. You get the recognition. Email Us:
> ban...@so...
> > _______________________________________________
> > Htmlparser-user mailing list
> > Htm...@li...
> > https://lists.sourceforge.net/lists/listinfo/htmlparser-user
>
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: ban...@so...
> _______________________________________________
> Htmlparser-developer mailing list
> Htm...@li...
> https://lists.sourceforge.net/lists/listinfo/htmlparser-developer
|