org.apache.shale.clay.parser.builder
Class IgnoreBuilder
java.lang.Object
org.apache.shale.clay.parser.builder.Builder
org.apache.shale.clay.parser.builder.VerbatimBuilder
org.apache.shale.clay.parser.builder.CommentBuilder
org.apache.shale.clay.parser.builder.IgnoreBuilder
public class IgnoreBuilder
- extends CommentBuilder
This Builder
is designed to ignore processing on a
block of HTML. If the jsfid attribute of the HTML node is
"ignore", all of the child nodes under the marked nodes are
excluded from further processing. The are treated like a
verbatim block. The outer node is removed from the output.
Fields inherited from class org.apache.shale.clay.parser.builder.Builder |
messages |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IgnoreBuilder
public IgnoreBuilder()
getJsfid
protected String getJsfid(Node node)
Returns the jsfid
for the target ElementBean
.
- Overrides:
getJsfid
in class VerbatimBuilder
- Parameters:
node
- markup
- Returns:
- jsfid
encodeBegin
protected void encodeBegin(Node node,
ElementBean target,
ComponentBean root)
Builds a outputText component. The attribute value is the content of the
child nodes. The root HTML Node
is not included in the content
of the target
ElementBean
node.
- Overrides:
encodeBegin
in class CommentBuilder
- Parameters:
node
- markuptarget
- child config beanroot
- parent config bean
captureComment
protected void captureComment(Node node,
StringBuffer commentBody)
Recursively traverses the children of the HTML
Node
concatenating
the raw text of each Token
into the commentBody
. Ending nodes are not kept
with the parser. If a start node is found that is not self
terminated, a matching ending node is created.
- Overrides:
captureComment
in class CommentBuilder
- Parameters:
node
- markupcommentBody
- concatenated raw text of all the children
Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.