Class IncludeRule

java.lang.Object
org.apache.commons.digester3.Rule
org.apache.commons.digester3.xmlrules.IncludeRule

final class IncludeRule extends Rule
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 Details

  • Constructor Details

  • Method Details

    • begin

      public void begin(String namespace, String name, Attributes attributes) throws Exception
      This method is called when the beginning of a matching XML element is encountered.
      Overrides:
      begin in class Rule
      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 namespace
      name - the local name if the parser is namespace aware, or just the element name otherwise
      attributes - The attribute list of this element
      Throws:
      Exception - if any error occurs
    • install

      private void install(RulesModule rulesModule)