Class Transformation.ContextChecker

java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.xslt.tdom.Visitor
eu.bandm.tools.xslt.base.CombinedVisitor
eu.bandm.tools.xslt.base.Transformation.ContextChecker
All Implemented Interfaces:
PCDataVisitor
Enclosing class:
Transformation

class Transformation.ContextChecker extends CombinedVisitor
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) Set<NamespaceName>
    For the "duplicate usage check" of xsl:with-param.
    (package private) eu.bandm.tools.xslt.tdom.Element_xsl_template
    For the "parameter exists check" of xsl:with-param.
    (package private) final Function<NamespaceName,eu.bandm.tools.xslt.tdom.Element>
     
    (package private) MultiTypeNodeList.frequency
    Accumulator.
    (package private) TypedSubstantial
    Either the xslt element currently under context check, or a MultiTypeNodeList.
    (package private) List<eu.bandm.tools.xslt.tdom.Element_xsl_sort>
     
     

    Fields inherited from class eu.bandm.tools.xslt.base.CombinedVisitor

    subtrees

    Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor

    validating
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContextChecker(Map<eu.bandm.tools.xslt.tdom.Element,MultiTypeNodeList> subtrees)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    atMostOneDef(eu.bandm.tools.xslt.tdom.Element el, CDataAttribute attr)
    Checks for param, with-param and variable that not both, select and contents, are defined.
    (package private) void
    check_reached_by_reference(eu.bandm.tools.xslt.tdom.Element el, boolean isTopParameter, boolean isTopVariable)
    Only entry point called form outside, and called recursively for elements addressed by name, out of a tpath expression, or from an xsl:call-template, etc.
    (package private) void
    checkDOE(CDataAttribute att, eu.bandm.tools.xslt.tdom.Element el)
     
    (package private) void
    Context check the objects referred to in the XPath-expression, namely variables/parameters, function definitions and (possibly) input model elements.
    (package private) Type.XPathType
    Calls tpath type check for an xpath expression.
    protected NamespaceName
    constant_result_NsName(CDataAttribute attr_name, CDataAttribute attr_namespace, boolean isAttr)
    For xsl:attribute or xsl:element, two(2) attributes carry local-name and namespaceURI explicitly.
    (package private) Character
    dfsDecode(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el, CDataAttribute att)
     
    protected void
    newVar(eu.bandm.tools.xslt.tdom.Element el, CDataAttribute name, String cat)
    Create a new "stack" variable, add a new entry into Transformation.possibleBindings for context check, and stores NamespaceName for later execution.
    (package private) void
    parse_xslt_tpath_attribute(CDataAttribute a, boolean required, String spec)
    Executes parsing and translation into an xpath expression for the text of the xslt attribute (which as a whole and always MUST be interpreted as a tpath expression), and subsequent context check.
    (package private) void
    Executes parsing and translation of an xslt attribute which MAY contain (zero to many) attribute value templates, and subsequent context check.
    (package private) @Opt Type.XPathType
    parse_xslt_tpath_expr(CDataAttribute a, boolean required, boolean isTemplate, String role, String spec)
     
    protected void
    pop()
    Store the current frequency to the scope element, close scope, reconstruct enclosing scope, but update frequency.
    (package private) void
     
    (package private) void
     
    protected void
    Open a new scope by pushing scope element, frequency, and binding to stack.
    (package private) void
     
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el)
    NOP, has neither attribs nor contents.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates el)
    Has sort and with-param sub-objects, @select, @mode attributes.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates.Attr_select a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute_set el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_call_template el)
    Static checks: template with name exists DONE with-param names are disjoint DONE template identified statically DONE all "with-param" names are declared in template DONE Can contain only with_param (by DTD).
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el)
    ATTENTION: xsl:copy-of has no contents, but must be set as "scopeElement" for the test of its attributes.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of.Attr_select a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el)
    Initialization of a JDK1.1 java.text.DecimalFormat class.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_element el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each.Attr_select a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_if el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_if.Attr_test a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_import el)
    NOP, all has been done by Transformation.Loader.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_include el)
    NOP, all has been done by Transformation.Loader.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_key el)
    Collect all xsl:key elements into the directory Transformation.keyDefs.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_key.Attr_match a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_key.Attr_use a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_message el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_count a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_format a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_from a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_grouping_separator a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_grouping_size a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_lang a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_letter_value a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_value a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_output el)
    Simply NOP; treated explcitly by getXslOutput().
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_param el)
    Treat local params.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction.Attr_name a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_case_order a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_data_type a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_lang a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_order a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_select a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_text el)
    ATTENTION d2d-generated dtd currently has
    <!ATTLIST xsl:text disable-output-escape CDATA "no">
    instead of
    <!ATTLIST xsl:text disable-output-escape (yes|no) "no">
    So reading the attribute value can change to ENUMERATION in future !?
    ATTENTION writing un-escaped character data means mixing model transformation with serialization.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of el)
    ATTENTION: xsl:value-of has no contents, but must be set as "scopeElement" for the test of its attributes.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of.Attr_select a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_variable el)
    Treat local variables.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_when el)
    Can be overridden by the user to define particular semantic operations.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_when.Attr_test a)
    Can be overridden by the user.
    void
    visit(eu.bandm.tools.xslt.tdom.Element_xsl_with_param el)
    Can be overridden by the user to define particular semantic operations.
    void
    Attributes in result elements are already parsed, and have even been type checked if they are non-computing.

    Methods inherited from class eu.bandm.tools.xslt.base.CombinedVisitor

    testMulti, visit, visit, visit, visit, visitMultiListContents, visitResultElement

    Methods inherited from class eu.bandm.tools.xslt.tdom.Visitor

    visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit

    Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor

    visit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stack

    • scopeElement

      TypedSubstantial scopeElement
      Either the xslt element currently under context check, or a MultiTypeNodeList. Used (a) to get location info, namespace resolution; used (b) to finally store calculated frequency and type.
    • sortlist

      List<eu.bandm.tools.xslt.tdom.Element_xsl_sort> sortlist
    • frequ

      Accumulator.
    • directlyCalled

      eu.bandm.tools.xslt.tdom.Element_xsl_template directlyCalled
      For the "parameter exists check" of xsl:with-param.
    • argumentNames

      Set<NamespaceName> argumentNames
      For the "duplicate usage check" of xsl:with-param.
    • f_readReference

      final Function<NamespaceName,eu.bandm.tools.xslt.tdom.Element> f_readReference
  • Constructor Details

  • Method Details

    • check_reached_by_reference

      void check_reached_by_reference(eu.bandm.tools.xslt.tdom.Element el, boolean isTopParameter, boolean isTopVariable)
      Only entry point called form outside, and called recursively for elements addressed by name, out of a tpath expression, or from an xsl:call-template, etc. (global variables, top-level parameters, named templates, unnamed templates, attributes in xsl:attributeSet).
      Parameters:
      isTopParameter - is true for GLOBAL parameters
      isTopVariable - is true for GLOBAL variables For both top-level definitions there is an additional cycle detection mechanism (if --pedantic mode) and lower frequency bounds.
      The circularity test for top-level variable-binding objects is only in mode --pedantic, because the same test is NOT proposed for recursively called templates, which basically are the same mathematical structure.
    • push

      protected void push(TypedSubstantial el)
      Open a new scope by pushing scope element, frequency, and binding to stack. Make given element the new scope and restart evaluation with minimal frequency.
    • pop

      protected void pop()
      Store the current frequency to the scope element, close scope, reconstruct enclosing scope, but update frequency.
    • raiseFrequency

      void raiseFrequency(MultiTypeNodeList.frequency f2)
    • prepare_attset_usage

      void prepare_attset_usage(TypedElement el, CDataAttribute att)
    • prepare_attset_usage

      void prepare_attset_usage(TypedSubstantial el, String names)
    • constant_result_NsName

      protected NamespaceName constant_result_NsName(CDataAttribute attr_name, CDataAttribute attr_namespace, boolean isAttr)
      For xsl:attribute or xsl:element, two(2) attributes carry local-name and namespaceURI explicitly. Check whether they are constant; calculate the NamespaceName.
    • visitMultiList

      public void visitMultiList(MultiTypeNodeList list)
      Attributes in result elements are already parsed, and have even been type checked if they are non-computing. Computing attributes hold a tpath expression, which must be context checked. Missing attributes can be healed by xsl:attribute elements or xsl:useAttributeSets.
      Overrides:
      visitMultiList in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el)
      NOP, has neither attribs nor contents.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates el)
      Has sort and with-param sub-objects, @select, @mode attributes.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute_set el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_call_template el)
      Static checks:
      • template with name exists DONE
      • with-param names are disjoint DONE
      • template identified statically DONE
      • all "with-param" names are declared in template DONE
      Can contain only with_param (by DTD).
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el)
      ATTENTION: xsl:copy-of has no contents, but must be set as "scopeElement" for the test of its attributes.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • dfsDecode

      Character dfsDecode(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el, CDataAttribute att)
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el)
      Initialization of a JDK1.1 java.text.DecimalFormat class.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_element el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_if el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_import el)
      NOP, all has been done by Transformation.Loader.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_include el)
      NOP, all has been done by Transformation.Loader.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_key el)
      Collect all xsl:key elements into the directory Transformation.keyDefs.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_message el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_output el)
      Simply NOP; treated explcitly by getXslOutput().
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_param el)
      Treat local params. Globals/top-levels are treated by check_reached_by_reference(eu.bandm.tools.xslt.tdom.Element, boolean, boolean). As long as no control flow analysis: assume frequency is maximum.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • checkDOE

      void checkDOE(CDataAttribute att, eu.bandm.tools.xslt.tdom.Element el)
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_text el)
      ATTENTION d2d-generated dtd currently has
      <!ATTLIST xsl:text disable-output-escape CDATA "no">
      instead of
      <!ATTLIST xsl:text disable-output-escape (yes|no) "no">
      So reading the attribute value can change to ENUMERATION in future !?
      ATTENTION writing un-escaped character data means mixing model transformation with serialization. IF we want to generate a new result model fragment from text, the clean way is
      (1) to parse the text in advance, into a model element
      (2) to link the model element to an external parameter
      (3) to insert the parameter with "copy-of"
      FIXME not yet implemented.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of el)
      ATTENTION: xsl:value-of has no contents, but must be set as "scopeElement" for the test of its attributes.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_variable el)
      Treat local variables. Globals/top-levels are treated by check_reached_by_reference(eu.bandm.tools.xslt.tdom.Element, boolean, boolean)
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_when el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_with_param el)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) andfor all PCData and all Elements in its contents.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates.Attr_select a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of.Attr_select a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each.Attr_select a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_if.Attr_test a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_key.Attr_match a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_key.Attr_use a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_count a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_from a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_value a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_format a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_lang a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_letter_value a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_grouping_separator a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number.Attr_grouping_size a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction.Attr_name a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_select a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_lang a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_data_type a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_order a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort.Attr_case_order a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of.Attr_select a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_when.Attr_test a)
      Description copied from class: eu.bandm.tools.xslt.tdom.Visitor
      Can be overridden by the user. Is called whenever traversing of a model instance (as defined by the methods in this class) reaches such an Attribute.
      This default implementation does nothing.
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • atMostOneDef

      boolean atMostOneDef(eu.bandm.tools.xslt.tdom.Element el, CDataAttribute attr)
      Checks for param, with-param and variable that not both, select and contents, are defined.
      [XSLT 1.0:11.2,beginning]
      "If the variable-binding element has a select attribute, [..] In this case, the content must be empty."
      (Even whitespace not allowed, Whitespace here still exists.)
      Returns:
      whether contents is non-empty and must be visited. In case of a attr.isSpecified() the descending is started HERE, including parsing, TPath type check and frequency calculation. Otherwise this must be done by the caller.
    • parse_xslt_tpath_attribute

      void parse_xslt_tpath_attribute(CDataAttribute a, boolean required, String spec)
      Executes parsing and translation into an xpath expression for the text of the xslt attribute (which as a whole and always MUST be interpreted as a tpath expression), and subsequent context check.
    • parse_xslt_tpath_attributeTemplate

      void parse_xslt_tpath_attributeTemplate(CDataAttribute a, boolean required, String spec)
      Executes parsing and translation of an xslt attribute which MAY contain (zero to many) attribute value templates, and subsequent context check.
    • parse_xslt_tpath_expr

      @Opt @Opt Type.XPathType parse_xslt_tpath_expr(CDataAttribute a, boolean required, boolean isTemplate, String role, String spec)
    • newVar

      protected void newVar(eu.bandm.tools.xslt.tdom.Element el, CDataAttribute name, String cat)
      Create a new "stack" variable, add a new entry into Transformation.possibleBindings for context check, and stores NamespaceName for later execution.
      FIXME TpathType berechnen und abspeichern!
    • checkReferences

      void checkReferences(TPathCache.ExprClassified e)
      Context check the objects referred to in the XPath-expression, namely variables/parameters, function definitions and (possibly) input model elements.
    • checkTpath

      Type.XPathType checkTpath(TPathCache.ExprClassified expr, NamespaceName attributeName)
      Calls tpath type check for an xpath expression. ASSUME checkreference has been run and all referred vars are typed. (param attributeName only for logging information.)