Class XsltInstance.CollectAllElements

Enclosing class:
XsltInstance

protected class XsltInstance.CollectAllElements extends SinglePhase
Collect all elements which can appear in an xslt template spontaneously on the top level of a template content, because they are reachable elements of the target text format. (Only XML elements can appear in this position, not attributes. D2d definitions with xml_kind==attribute are ignored throughout.)
  • Field Details

    • found

      protected Map<String,Definition> found
      All Definitions reachable from the entry definition given to findTopLevel(eu.bandm.tools.d2d2.model.Definition) and selected for direct notation.
    • notAccessible

      protected Set<Definition> notAccessible
      All Definitions reachable from the entry definition given to findTopLevel(eu.bandm.tools.d2d2.model.Definition) and not selected for direct notation.
    • visited

      protected Set<Definition> visited
      For to visit each definitions only once.
  • Constructor Details

    • CollectAllElements

      protected CollectAllElements()
  • Method Details

    • takeDiscard

      protected void takeDiscard(String tag, Definition take, Definition discard)
      Puts one argument into the found and the other in the notAccessible set.
    • classify

      protected void classify(Definition t)
      Consider the tag of the Definition (with xml_kind==element) for being directly referrable in an xslt template. Definitions on module level are preferred over local definitions. In both groups, the (accidentally!) first found definition will be selected.
    • action

      public void action(Reference ref)
      Follow the argument to the addressed definition.
      Overrides:
      action in class SinglePhase
    • action

      public void action(Definition d)
      Is matched by definitions which are neither Tags- nor Chars-RegExps. Classify the argument, if not already done so.
      Overrides:
      action in class SinglePhase
    • action

      public void action(TagsRegExp t)
      Overrides:
      action in class SinglePhase
    • action

      public void action(CharsRegExp t)
      Overrides:
      action in class SinglePhase