The PrototypicalNodeFactory is a concrete implementation of that interface that works by cloning prototype tags it maintains in a list (string and remark nodes are handled separately from tags). You can add your own tags via registerTag(). Again, see the JavaDocs.
Recursion enters into it indirectly via the scanner for composite tags (tags with the form <XXX>yy zz ...</XXX>), which may invoke tag creation and recursive scanning for it's children (the yy zz etc.).
Derrick
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-03-18
Derrick,
Thanks much for your reply.
>--
Recursion enters into it indirectly via the scanner for composite tags (tags with the form <XXX>yy zz ...</XXX>), which may invoke tag creation and recursive scanning for it's children (the yy zz etc.).
>--
I assume it here means the PrototypicalNodeFactory.
Now what is the scanner ?
How does the scanner invoke tag creation and resursion ?
Thanks for all the help.
Regards
Suchak Jani
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Short answer: The composite tag scanner is the one that tries to match end tags, it calls the lexer which invokes the node factory as needed to create nodes for returning. If a tag has a scanner, it will be called inside of the other scanning process to handle nested tags: <XXX>yy zz <PPP>qq</PPP> ...</XXX>
If the PPP scanner is the same as the XXX scanner (usually the CompositeTagScanner) it's not recursive, but the context is stacked and the same scanner just does the inner tag and returns a complete tag to the outer stack frame.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what is a nodefactory? what does it do, what is a PrototypicalNodeFactory ?
I tried to search for some docs on this but did not find much.
Now is the above in anyway related to recursion ?
Regards
Suchak Jani
NodeFactory is the interface used to create new nodes in the Lexer and Parser. See the JavaDocs http://htmlparser.sourceforge.net/javadoc/index.html .
The PrototypicalNodeFactory is a concrete implementation of that interface that works by cloning prototype tags it maintains in a list (string and remark nodes are handled separately from tags). You can add your own tags via registerTag(). Again, see the JavaDocs.
Recursion enters into it indirectly via the scanner for composite tags (tags with the form <XXX>yy zz ...</XXX>), which may invoke tag creation and recursive scanning for it's children (the yy zz etc.).
Derrick
Derrick,
Thanks much for your reply.
>--
Recursion enters into it indirectly via the scanner for composite tags (tags with the form <XXX>yy zz ...</XXX>), which may invoke tag creation and recursive scanning for it's children (the yy zz etc.).
>--
I assume it here means the PrototypicalNodeFactory.
Now what is the scanner ?
How does the scanner invoke tag creation and resursion ?
Thanks for all the help.
Regards
Suchak Jani
Short answer: The composite tag scanner is the one that tries to match end tags, it calls the lexer which invokes the node factory as needed to create nodes for returning. If a tag has a scanner, it will be called inside of the other scanning process to handle nested tags: <XXX>yy zz <PPP>qq</PPP> ...</XXX>
If the PPP scanner is the same as the XXX scanner (usually the CompositeTagScanner) it's not recursive, but the context is stacked and the same scanner just does the inner tag and returns a complete tag to the outer stack frame.