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

  • Constructor Details

    • CollectAllElements

      protected CollectAllElements()
  • Method Details

    • findTopLevel

      Map<String,Definition> findTopLevel(Definition def)
      Starting from the given entry definition find all tags which can appear in an xslt template spontaneously. Since there is nothing known about the future applicaion context of such a template, only one single definition can be assumed per identifier/tag. This method extracts these and reports warnings about all homonyms which will not be addressalbe directly. (They still can be built using <xslt:element>.)
    • takeDiscard

      protected void takeDiscard(String tag, Definition take, Definition discard)
      Puts one argument into the found and the outer 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