Class Application<N>

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.Application<N>
Type Parameters:
N - the node type of the input dom.
All Implemented Interfaces:
PCDataVisitor

public class Application<N> extends CombinedVisitor
Each instance of this class realizes the application of an xslt program, given as a Transformation, to a certain input. The constructor must be called, and then execute(), which returns the result either as one single TypedSubstantial, or as a MultiTypeNodeList, (but of course containing no more xslt elements but only Result Tree Fragments).
The real evaluation is nothing more than
  1. step through all MultiTypeNodeLists, thereby
    (a) copying all result type constants found into a result buffer,
    and (b) the results of evaluating all xslt commands.
  2. additionally, an xslt command can be replaced by its result iff its frequency is lower than "always".
  3. reduce the MultiTypeNodeList to a result type tdom element (which implies type checking).
  4. continuing so bottom-up
As preparatory step, all MultiTypeNodeLists which have mixed frequency are rewritten, so that they can be updated without disturbing the original Transformation object (esp. its Map "result_subtrees")
FIXME check expression CACHE (general expression cache) vs atribnameonlyonce
FIXME generation of TEXT ONLY (resultContext==null) missing.
FIXME OWN "pedantic" for Transformation and Application !?!? DISLOC [XSLT 1.0:14.2] defines NamespaceNames for extension functions
  • Field Details

  • Constructor Details

  • Method Details

    • pushBinding

      protected void pushBinding(NamespaceName name, Value<N> value)
    • execute

      public MultiTypeNodeList execute()
      Top-level call for the start element. (initial_context is already set up.) FIXME result should be checked for unity !?!?
    • singleResultElement

      @Opt public @Opt TypedElement singleResultElement()
    • rewriteMixedBlocks

      void rewriteMixedBlocks()
      Preparation step which copies the code iff necessary. Basic aim is that blocks with frequency = "once" can be REPLACED by their evaluation result (appearing as a "const" block) without damaging the original code. Therefore a toplevel "once" block or all "mixed" blocks atop of a "once" must be copied. Blocks with frequ "always" must always be executed and the original code can be shared between applications. Blocks with frequ "constant" COULD already have been eliminated when type checking, but this would imply a different strictness strategy! Currently they are treated like "once".
    • rewrite

      MultiTypeNodeList rewrite(MultiTypeNodeList orig, boolean is_top)
    • rewrite_recursive

      MultiTypeNodeList rewrite_recursive(MultiTypeNodeList orig)
    • matchSimilar

      public static <P> TPathCache.ExprClassified matchSimilar(DocumentClient<P> dc, P node)
      FIXME namespace name prefix is NOT available here !?!?!
    • dumpTemplate

      void dumpTemplate(PrintStream pos, eu.bandm.tools.xslt.tdom.Element_xsl_template template)
    • dumpBindings

      void dumpBindings(PrintStream p, Binding bindings)
    • dumpBindings

      void dumpBindings(Binding bindings)
    • hintCurrentFocus

      void hintCurrentFocus()
    • log

      void log(String s)
    • log

    • error

      void error(Exception ex, Location<XMLDocumentIdentifier> loc, String s)
    • error

      void error(String s)
    • warning

      void warning(Location<XMLDocumentIdentifier> loc, String s)
    • hint

      void hint(Location<XMLDocumentIdentifier> loc, String s)
    • failure

      void failure(Exception ex, Location<XMLDocumentIdentifier> loc, String s)
    • eval_attr_to_string

      String eval_attr_to_string(Binding<String,String> nsContext, NamespaceName elName, NamespaceName attName, Location<XMLDocumentIdentifier> loc, TPathCache.ExprClassified expr)
      Evaluate attribute and convert it to string, according to xpath rules.
    • eval_attr_to_value

      Value<N> eval_attr_to_value(Binding<String,String> nsContext, NamespaceName elName, NamespaceName attName, Location<XMLDocumentIdentifier> loc, TPathCache.ExprClassified expr)
      Evaluate the tpath expr. elName, att and loc are for diagnosis only. Dynamic bindings and current tpath context come via global variables bindings and current_context.

      FIXME CACHE !?!? (dep. on frequencies)
    • eval_xslt_attr_to_value

      Value<N> eval_xslt_attr_to_value(TypedElement<?,?> el, TypedAttribute att)
      Evaluate the tpath expr in the given xslt attributes value, using the pre-compiled tpath objects in the transformation's cache.
    • eval_xslt_attr_to_string

      String eval_xslt_attr_to_string(TypedElement<?,?> el, TypedAttribute att)
      Evaluate attribute and convert it to string, according to xpath rules.
    • eval_xslt_attr_to_namespaceName

      NamespaceName eval_xslt_attr_to_namespaceName(TypedElement<?,?> el, TypedAttribute att)
      Evaluate attribute and convert it to NamespaceName (use no default).
    • retrieve_xslt_expr

      TPathCache.ExprClassified retrieve_xslt_expr(TypedElement<?,?> el, TypedAttribute att)
      Called iff the attribute has been specified in the source, i.e. set in the model. The parsed TPath exressions for all xslt attributes are kept globally. (The corresponding result attributes are kept locally in the MultiTypeNodeList field MultiTypeNodeList.attCheckResults.)
    • calculate_result_nsName

      protected NamespaceName calculate_result_nsName(eu.bandm.tools.xslt.tdom.Element el, TypedAttribute attr_name, @Opt @Opt TypedAttribute attr_namespace, boolean isAttr)
      Calculates the Namespace name for the result object to be generated by xsl:element and xsl:attribute commands.
      FIXME nine cases (name and namespace can INDEPENDENTLY have been found constant, erronuous or still to calcalute) are not yet completely communicated from Transformation to Application.
    • findRuleAndApply

      void findRuleAndApply(NamespaceName mode)
      Find the template for the current focus (may be the default template), execute it and store the result via deliver(eu.bandm.tools.tdom.runtime.TypedSubstantial) into the currently growing result sequence. ONLY called from visit(xsl:apply-templates).
    • findMatchingTemplate

      @Opt Rt.TemplateEntry findMatchingTemplate(N focus, @Opt @Opt NamespaceName mode)
      Only called from ONE point in findRuleAndApply(eu.bandm.tools.util.xml.NamespaceName).
      Test IMPORTS when fails.
      Returns:
      null if no explicit template definition matches.
    • findMatchingTemplate

      @Opt Rt.TemplateEntry findMatchingTemplate(N focus, @Opt @Opt NamespaceName mode, Transformation trans)
      Recursive call for stepping through imported stylesheets.
    • _traceTest

      protected void _traceTest(String prefixText, TypedElement el, String testSource, String result)
    • _traceTest

      protected void _traceTest(String prefixText, TypedElement el, String testSource, Value result)
    • errorOrWarning

      protected void errorOrWarning(boolean errorNotWarn, Location<XMLDocumentIdentifier> loc, String text)
    • openResultFrame

      protected void openResultFrame(@Opt @Opt NamespaceName constructor, @Opt @Opt Location<XMLDocumentIdentifier> loc)
      constructor == null when collecting variable contents.
    • openResultFrame

      protected void openResultFrame(@Opt @Opt NamespaceName constructor, @Opt @Opt Location<XMLDocumentIdentifier> loc, MultiTypeNodeList proto)
      constructor == null when collecting contents for variables, comments, processing instructions, paramters, etc.
    • deliver

      void deliver(TypedSubstantial n)
    • deliver

      void deliver(String s)
    • deliver

      void deliver(char[] ch, int start, int length)
    • deliver

      void deliver(String<N> s)
    • deliverEth

      void deliverEth(TypedEthereal c)
    • deliverAtt

      void deliverAtt(Location<XMLDocumentIdentifier> loc, NamespaceName nn, String value)
    • previousErrorIndication

      String<N> previousErrorIndication(Location<XMLDocumentIdentifier> loc)
    • dropResultFrame

      protected void dropResultFrame()
    • findSemiparseConstructor

      Constructor<TypedElement> findSemiparseConstructor(NamespaceName nn)
    • _display

      String _display(MultiTypeNodeList mn)
    • _display

      String _display(List<?> ts)
    • collectPcData

      protected void collectPcData(MultiTypeNodeList c, StringBuilder sb, String desc)
    • reduceResultFrameToString

      protected String reduceResultFrameToString(String desc)
    • reduceResultFrame

      protected TypedElement reduceResultFrame()
    • visit_xslt_contents

      void visit_xslt_contents(eu.bandm.tools.xslt.tdom.Element el)
    • visitMultiList

      public void visitMultiList(MultiTypeNodeList mtn)
      Top-Level MultiTypeNodeList are sequences of xslt elements, complete result elements and MultiTypeNodeList. The latter are un-complete result elements, which is something different!
      Overrides:
      visitMultiList in class CombinedVisitor
    • visit

      public void visit(TypedPCData pcd)
      Typed PCData in incomplete result elements or in an xslt element (eg. chosen xsl:if or xsl:when) is simply copied to the result element under construction (i.e. resultFrame).
      Specified by:
      visit in interface PCDataVisitor
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visitResultElement

      public void visitResultElement(TypedElement el)
      Overrides:
      visitResultElement in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports 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 .
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • sort2comp

      Comparator<Context<N>> sort2comp(eu.bandm.tools.xslt.tdom.Element_xsl_sort el)
    • sequToVisit

      ContextSequence<N> sequToVisit(TypedElement el, TypedAttribute selectAtt, List<eu.bandm.tools.xslt.tdom.Element_xsl_sort> sortings)
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates 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 CombinedVisitor
    • evalAttributeName

      NamespaceName evalAttributeName(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el)
    • evalAttributeValue

      String evalAttributeValue(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el, NamespaceName nn)
    • 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)
      AttributeSets have a constant frequency of "perSourceCorpus". Their only contents are xsl:attribute elements.
      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 have been passed, otherwise code==null, see Transformation
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_choose 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 CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_comment 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 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)
      Implements [XSLT 1.0:11.3].
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format 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_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)
      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_include 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_key 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_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_namespace_alias 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
    • getSelfAndAncestorsUnderDocument

      public List<N> getSelfAndAncestorsUnderDocument(N node)
    • 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
    • evalNumber_singleOrMultiple

      List<Integer> evalNumber_singleOrMultiple(TPathCache.ExprClassified count, @Opt @Opt TPathCache.ExprClassified from, boolean isMultiple)
      Different optimizations are possible:
      • the function "id" matches maximally once. (but a pattern can be a union of "id()")
      • stepping through "previou ssiblings" can be realized by "interperter.apply(xx.withRoot(..))"
      • The prefix "///.." (root->descendant->..) can be canceled and the the PatternPart thus transformed to an "unrooted" one!
    • evalNumber_any

    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el)
      Inherit transparently: descending.
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_output 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_var_and_param

      Value<N> visit_var_and_param(eu.bandm.tools.xslt.tdom.Element el, NamespaceName nn, TypedAttribute selectAttribute)
      For variables, params and with-params; evaluates xpath expression in select attribute OR visits the contents and wraps it into a Application.Value_RS. The result is returned and must be stored in a binding context by the caller, according to the different visibility rules.
      (In local vars/params the growing context the new binding is immediately visible in the following sibling; for with-params (arguments of calls) read and written contexts are distinct.

      [XSLT 1.0:11.2] says: "If the variable-binding element has empty content and does not have a select attribute, then the value of the variable is an empty string."
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_variable 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_param el)
      Is treated in var-look-up (for toplevel params) or in call-template or in apply-templates.
        1) call-template with-param        ======>  3a) template  param
        2) apply-templates with-param      ======>  3b) template  param
        4) variable            (X)
        5) top-level-variable  (X)
        6) top-level-param     (X)
        
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_preserve_space 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_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)
      NOP. Are already collected in Transformation and treated in course of "sequToVisit()".
      Overrides:
      visit in class eu.bandm.tools.xslt.tdom.Visitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_strip_space 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_template el)
      Executed after a call-template (caller!=null) or apply-templates.
      FIXME ersteres kann kurzgeschlossen werden !?!? Preparations of parameters is stored in callState. In the first case all undeclared with-params are suppressed by static analysis (only "template2params.get(el)" are processed.) // FIXME this case should be INLINED (no visit() necessary) This is different with apply-templates: Undeclared with-params must be eliminated for each template differently, for not to shadow globals. The resulting bindings are constant per template and apply-templates execution and are cached in callstate. Default values for declared but not supplied parameters must be calculated in both cases. (They may depend on the current focus, which in case of caller==null is VARYING!)
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_text el)
      Deliver text contents, or start a sub-parser for "disabled output escaping".
      Overrides:
      visit in class CombinedVisitor
    • visit

      public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of el)
      Implements [XSLT 1.0:7.6.1] "The xsl:value-of element is instantiated to create a text node in the result tree. The required select attribute is an expression; this expression is evaluated and the resulting object is converted to a string as if by a call to the string function."
      "disable output escaping" is realized by parsing the text as if it was in an original input document, see feedTextToResult(Element,String) ("general entities" are not considered ? FIXME)
      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
    • calculate_absolute_pattern_value

      NodeSet<N> calculate_absolute_pattern_value(TPath.Expr expr)
      calculate and cache node sets which only depend on the namespace context.
    • feedTextToResult

      protected void feedTextToResult(eu.bandm.tools.xslt.tdom.Element el, String text)
      ATTENTION :
      (1) Assume only relatively SMALL text, so all sax events are collected statically / thread-less in ONE Queue.
      (2) numeric character references "&#...;" should be resolved on parsing . (3) namespace start/end mapping prefices not yet correctly handled (4) namespace resolution unclear !?!?!?