Class IncludeRule
java.lang.Object
org.apache.commons.digester3.Rule
org.apache.commons.digester3.xmlrules.IncludeRule
A rule for including one rules XML file within another. Included files behave as if they are 'macro-expanded' within
the includer. This means that the values of the pattern stack are prefixed to every pattern in the included rules.
This rule will detect 'circular' includes, which would result in infinite recursion. It throws a CircularIncludeException when a cycle is detected, which will terminate the parse.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private final WithMemoryRulesBinder
private final RulesBinder
-
Constructor Summary
ConstructorsConstructorDescriptionIncludeRule
(WithMemoryRulesBinder memoryRulesBinder, RulesBinder targetRulesBinder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin
(String namespace, String name, Attributes attributes) This method is called when the beginning of a matching XML element is encountered.private void
install
(RulesModule rulesModule) Methods inherited from class org.apache.commons.digester3.Rule
body, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
-
Field Details
-
CLASSPATH_URL_PREFIX
- See Also:
-
memoryRulesBinder
-
targetRulesBinder
-
-
Constructor Details
-
IncludeRule
-
-
Method Details
-
begin
This method is called when the beginning of a matching XML element is encountered.- Overrides:
begin
in classRule
- Parameters:
namespace
- the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespacename
- the local name if the parser is namespace aware, or just the element name otherwiseattributes
- The attribute list of this element- Throws:
Exception
- if any error occurs
-
install
-