[Htmlparser-cvs] htmlparser/src/org/htmlparser/visitors UrlModifyingVisitor.java,1.36,1.37
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-01 21:55:49
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/visitors In directory sc8-pr-cvs1:/tmp/cvs-serv2656/visitors Modified Files: UrlModifyingVisitor.java Log Message: Create nodes by cloning from a list of prototypes in the Parser (NodeFactory). So now, the startTag() is the CompositeTag, and the CompositeTagScanner just adds children. This is an intermediate code drop on the way to integrating the scanners with the tags; the scanners no longer create the tags (but they still create the prototypical ones). Index: UrlModifyingVisitor.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/visitors/UrlModifyingVisitor.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** UrlModifyingVisitor.java 29 Oct 2003 03:31:18 -0000 1.36 --- UrlModifyingVisitor.java 1 Nov 2003 21:55:44 -0000 1.37 *************** *** 44,48 **** public UrlModifyingVisitor(Parser parser, String linkPrefix) { ! super(true,false); this.parser = parser; parser.addScanner(new LinkScanner()); --- 44,48 ---- public UrlModifyingVisitor(Parser parser, String linkPrefix) { ! super(true,true); this.parser = parser; parser.addScanner(new LinkScanner()); *************** *** 66,75 **** public void visitTag(Tag tag) { ! modifiedResult.append(tag.toHtml()); } public void visitEndTag(Tag tag) { ! modifiedResult.append(tag.toHtml()); } --- 66,77 ---- public void visitTag(Tag tag) { ! if (null == tag.getParent ()) ! modifiedResult.append(tag.toHtml()); } public void visitEndTag(Tag tag) { ! if (null == tag.getParent ()) ! modifiedResult.append(tag.toHtml()); } |