public class TextContentRule extends SimpleRule
A TextContentRule is created for each PCDATA term found in a DTD grammar
rule production. A TextContentRule is created for the XSD simple type
xs:simpleType
.
Modifier and Type | Field and Description |
---|---|
private static Filter |
textFilter
The TextFilter used by this TextContentRule.
|
private Filter |
valueFilter
The ValueFilter used by this TextContentRule.
|
identifier, parent
Constructor and Description |
---|
TextContentRule()
Creates a TextContentRule testing for the exclusive presence of
textual content.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Element node)
Reports whether this TextContentRule accepts a given Element node,
having textual content.
|
void |
restrict(Filter filter)
Restricts this TextContentRule by adding a further Filter.
|
java.lang.String |
toString()
Returns a pretty representation of this TextContentRule.
|
isNestingRule
addChildRule, clearError, getChildIndex, getIdentifier, getRuleChildren, isAttributeRule, isElementRule, setChildIndex, setError, setParent, validate
private static Filter textFilter
private Filter valueFilter
public TextContentRule()
public boolean accept(Element node)
accept
in class GrammarRule
node
- an Element.public void restrict(Filter filter)
restrict
in class GrammarRule
filter
- the extra restriction to apply.public java.lang.String toString()
toString
in class java.lang.Object