public class VariableSubstitutor extends Substitutor
VariableExpander
implementations.
Supports setting an expander just for body text or just for attributes.
Also supported is setting no expanders for body text and for attributes.| Constructor | Description |
|---|---|
VariableSubstitutor(VariableExpander expander) |
Constructs a Substitutor which uses the same VariableExpander for both
body text and attibutes.
|
VariableSubstitutor(VariableExpander attributesExpander,
VariableExpander bodyTextExpander) |
Constructs a Substitutor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
substitute(java.lang.String bodyText) |
Substitutes for the body text.
|
org.xml.sax.Attributes |
substitute(org.xml.sax.Attributes attributes) |
Substitutes the attributes (before they are passed to the
Rule implementations's) |
public VariableSubstitutor(VariableExpander expander)
expander - VariableExpander implementation,
null if no substitutions are to be performedpublic VariableSubstitutor(VariableExpander attributesExpander, VariableExpander bodyTextExpander)
attributesExpander - VariableExpander implementation to be used for attributes,
null if no attribute substitutions are to be performedbodyTextExpander - VariableExpander implementation to be used for bodyTextExpander,
null if no attribute substitutions are to be performedpublic org.xml.sax.Attributes substitute(org.xml.sax.Attributes attributes)
Rule implementations's)substitute in class Substitutorattributes - the Attributes passed into Digester by the SAX parser,
not null (but may be empty)Attributes to be passed to the Rule implementations.
This method may pass back the Attributes passed in.
Not null but possibly empty.public java.lang.String substitute(java.lang.String bodyText)
substitute in class SubstitutorbodyText - the body text (as passed to Digester)Rule implementations