Thread: [Htmlparser-developer] Composite Tags != Composite Pattern
Brought to you by:
derrickoswald
From: <tez...@ya...> - 2003-05-29 11:53:13
|
The CompositeTag is quite heavy on tasty [Australian for good] functionality. The way it seems to be implemented here is contrary to the 'Composite' Design Pattern. I'm having difficulty forming a composite of the whole document, say an abstract <PARSE_ROOT> object. Currently I'm doing a hack, knowing there is a table: See Node nodes [] = myParser.extractAllNodesThatAre(TableTag.class); TableTag table = (TableTag)nodes[0]; TableTag htmlComposite = (TableTag) nodes[0]; I need to do this to access the CompositeTag functionality. Is there a simpler way? Would it be useful to have a public CompositeTag getRootTag() {} in Parser? Terry. ===== ------------------------------------------------------------ Terry Alexis Lurie | 'Something witty that doesn't Freelance Computer Engineer | look good with variable United Kingdom | width fonts' - Most nerds __________________________________________________ Yahoo! Plus - For a better Internet experience http://uk.promotions.yahoo.com/yplus/yoffer.html |
From: <jo...@in...> - 2003-06-11 17:49:34
|
I'm about to do some refactoring experiments so I started by running AllTests. I'm getting 8 failures: 3 in ScriptScannerTest 2 in AttributeParserTest 3 in TagParserTest Anyone know what is going on here? I want to begin with a green bar before I begin to refactor. thanks jk |
From: Derrick O. <Der...@ro...> - 2003-06-12 01:25:01
|
The failing tests are listed in the build notes: http://sourceforge.net/project/shownotes.php?group_id=24399&release_id=162916 You can shut some of them up by pretending that it's version 1.3. Edit Parser.java: public final static double VERSION_NUMBER = 1.3 ; Derrick jo...@in... wrote: >I'm about to do some refactoring experiments so I started by running >AllTests. I'm getting 8 failures: > >3 in ScriptScannerTest >2 in AttributeParserTest >3 in TagParserTest > >Anyone know what is going on here? I want to begin with a green bar >before I begin to refactor. > >thanks >jk > > > > > >------------------------------------------------------- >This SF.NET email is sponsored by: eBay >Great deals on office technology -- on eBay now! Click here: >http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 >_______________________________________________ >Htmlparser-developer mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlparser-developer > > > |
From: Joshua K. <jo...@in...> - 2003-06-13 04:23:24
|
How would you'all feel about creating a package called failingTests that would not be a part of the AllTests suite. This package would be the place we store our failing or temporarily failing tests. It would also be the place we must go, continuously, to rid the package of its failing tests. This would ensure that the bar is always green from the AllTests perspective, while still acknowledging areas that need work. thoughts, feelings, sarcasm? best regards jk |
From: Somik R. <so...@ya...> - 2003-06-17 00:47:07
|
Hi Josh, I don't think that is a good idea. It will encourage developer comfort with red - which will not help.. OTOH, I've fixed the ScriptScanner class- I went thru the discussion b/w Marc and Derrick, and understood the problem. It was actually a simple problem - we had support to tackle fake script matches, but it would trigger only on a double-quote. Now it also triggers on a single quote. The reason this might not have been apparent is that the class had smelly code - badly designed by me. I've refactored it to be intention-revealing, and hopefully manageable. I am looking into some of the other failing tests.. Regards, Somik ----- Original Message ----- From: "Joshua Kerievsky" <jo...@in...> To: <htm...@li...> Sent: Friday, June 13, 2003 12:22 AM Subject: Re: [Htmlparser-developer] failing tests > How would you'all feel about creating a package called failingTests that > would not be a part of the AllTests suite. This package would be the > place we store our failing or temporarily failing tests. It would also > be the place we must go, continuously, to rid the package of its failing > tests. This would ensure that the bar is always green from the AllTests > perspective, while still acknowledging areas that need work. > > thoughts, feelings, sarcasm? > > best regards > jk > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Htmlparser-developer mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-developer |
From: Somik R. <so...@ya...> - 2003-06-17 01:54:29
|
Hi Josh, On second thoughts, I think what you suggest is a good idea... :) After going thru the code, I realized that the current work in progress is too complex for me to fix quickly... There are some particularly hairy cases of attribute parsing that I think are being worked upon and may not be done soon. I've seperated failing tests into the package org.htmlparser.tests.temporaryFailures Derrick, Marc, Kaarle, Josh - Feel free to change the name if you prefer a more descriptive one. Also feel free to review this mechanism and change it if you do not like it. Kaarle - I've refactored AttributeParser - the logic remains intact. I have tried to guess the logic as much as I could, but you would be in a better position to complete it (modify names, etc..) Folks: we have a green bar now! Regards, Somik ----- Original Message ----- From: "Joshua Kerievsky" <jo...@in...> To: <htm...@li...> Sent: Friday, June 13, 2003 12:22 AM Subject: Re: [Htmlparser-developer] failing tests > How would you'all feel about creating a package called failingTests that > would not be a part of the AllTests suite. This package would be the > place we store our failing or temporarily failing tests. It would also > be the place we must go, continuously, to rid the package of its failing > tests. This would ensure that the bar is always green from the AllTests > perspective, while still acknowledging areas that need work. > > thoughts, feelings, sarcasm? > > best regards > jk > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Htmlparser-developer mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-developer |