Class 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.

    • Method Detail

      • begin

        public void begin​(java.lang.String namespace,
                          java.lang.String name,
                          org.xml.sax.Attributes attributes)
                   throws java.lang.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:
        java.lang.Exception - if any error occurs
      • install

        private void install​(RulesModule rulesModule)