Package eu.bandm.tools.xslt.base
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
Each instance of this class realizes the application of an xslt program,
given as a
The real evaluation is nothing more than
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
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
- 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. - additionally, an xslt command can be replaced by its result iff its frequency is lower than "always".
- reduce the MultiTypeNodeList to a result type tdom element (which implies type checking).
- continuing so bottom-up
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classExtension of Binding, where look-ups of GLOBAL Vars/Parameters lead to calculation on demand.(package private) classCommunicate start conditions from xsl-apply-templates to template execution.static classprotected classA "Result tree fragment" is a new kind of tpath value, namely a node set on the OUTPUT side, i.e. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) final Map<eu.bandm.tools.xslt.tdom.Element_xsl_attribute, NamespaceName> protected Application<N>.AllBinding(package private) final Function<NamespaceName, Function<N>> protected final BuiltInFunctions.AdditionalContext<N> The first key into this map is a NamespaceName context, ie.(package private) Application<N>.CallStateCommunicates the call state between visitor methods of apply-templates and called template(package private) Rt.TemplateEntry(package private) final DocumentClient<N> Caches stack variables (params, with-params, variables) the frequency of which is constant or once.final Map<NamespaceName, Value<N>> (package private) final Map<NamespaceName, Value<N>> (package private) final N(package private) final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> (package private) final Map<TypedSubstantial, Binding<String, String>> Is sum of transformation.ns_contexts and rewritten blocks.protected final NamespaceNameprotected MultiTypeNodeList(package private) final Map<NamespaceName, Constructor<TypedElement>> (package private) final Class<SemiparsingConstructor> protected final String(package private) Set<NamespaceName> protected final Application<N>.AllBinding(package private) Map<NamespaceName, Value<N>> "((CombinedVisitor)this).subtrees" is a collection of "self-modifying" code objects.(package private) Location<XMLDocumentIdentifier> (package private) final Interpreter<N> (package private) final Trace(package private) final Transformationprotected final StringFields inherited from class eu.bandm.tools.xslt.base.CombinedVisitor
subtreesFields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating -
Constructor Summary
ConstructorsConstructorDescriptionApplication(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, DocumentClient<N> documentClient, @Opt FunctionLibrary<N> allFuncs, Trace trace, Transformation transformation, N input, @Opt Map<NamespaceName, Value<N>> externalParameterValues) -
Method Summary
Modifier and TypeMethodDescription(package private) String(package private) Stringprotected void_traceTest(String prefixText, TypedElement el, String testSource, Value result) protected void_traceTest(String prefixText, TypedElement el, String testSource, String result) calculate and cache node sets which only depend on the namespace context.protected NamespaceNamecalculate_result_nsName(eu.bandm.tools.xslt.tdom.Element el, TypedAttribute attr_name, @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.protected voidcollectPcData(MultiTypeNodeList c, StringBuilder sb, String desc) (package private) voiddeliver(char[] ch, int start, int length) (package private) void(package private) void(package private) void(package private) voiddeliverAtt(Location<XMLDocumentIdentifier> loc, NamespaceName nn, String value) (package private) voidprotected void(package private) voiddumpBindings(Binding bindings) (package private) voiddumpBindings(PrintStream p, Binding bindings) (package private) voiddumpTemplate(PrintStream pos, eu.bandm.tools.xslt.tdom.Element_xsl_template template) (package private) void(package private) voidprotected voiderrorOrWarning(boolean errorNotWarn, Location<XMLDocumentIdentifier> loc, String text) (package private) Stringeval_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(Binding<String, String> nsContext, NamespaceName elName, NamespaceName attName, Location<XMLDocumentIdentifier> loc, TPathCache.ExprClassified expr) Evaluate the tpath expr.(package private) NamespaceNameeval_xslt_attr_to_namespaceName(TypedElement<?, ?> el, TypedAttribute att) Evaluate attribute and convert it to NamespaceName (use no default).(package private) Stringeval_xslt_attr_to_string(TypedElement<?, ?> el, TypedAttribute att) Evaluate attribute and convert it to string, according to xpath rules.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 thetransformation's cache.(package private) NamespaceNameevalAttributeName(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el) (package private) StringevalAttributeValue(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el, NamespaceName nn) (package private) IntegerevalNumber_singleOrMultiple(TPathCache.ExprClassified count, @Opt TPathCache.ExprClassified from, boolean isMultiple) Different optimizations are possible: the function "id" matches maximally once.execute()Top-level call for the start element.(package private) voidprotected voidfeedTextToResult(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.(package private) Rt.TemplateEntryfindMatchingTemplate(N focus, @Opt NamespaceName mode) Only called from ONE point infindRuleAndApply(eu.bandm.tools.util.xml.NamespaceName).(package private) Rt.TemplateEntryfindMatchingTemplate(N focus, @Opt NamespaceName mode, Transformation trans) Recursive call for stepping through imported stylesheets.(package private) voidFind the template for the current focus (may be the default template), execute it and store the result viadeliver(eu.bandm.tools.tdom.runtime.TypedSubstantial)into the currently growing result sequence.(package private) Constructor<TypedElement> (package private) voidhint(Location<XMLDocumentIdentifier> loc, String s, Object... args) (package private) void(package private) voidlog(Location<XMLDocumentIdentifier> loc, String s) (package private) voidstatic <P> TPathCache.ExprClassifiedmatchSimilar(DocumentClient<P> dc, P node) FIXME namespace name prefix is NOT available here !?!?!protected voidopenResultFrame(@Opt NamespaceName constructor, @Opt Location<XMLDocumentIdentifier> loc) constructor == null when collecting variable contents.protected voidopenResultFrame(@Opt NamespaceName constructor, @Opt Location<XMLDocumentIdentifier> loc, MultiTypeNodeList proto) constructor == null when collecting contents for variables, comments, processing instructions, paramters, etc.protected voidpushBinding(NamespaceName name, Value<N> value) protected TypedElementprotected String(package private) TPathCache.ExprClassifiedretrieve_xslt_expr(TypedElement<?, ?> el, TypedAttribute att) Called iff the attribute has been specified in the source, i.e.(package private) MultiTypeNodeListrewrite(MultiTypeNodeList orig, boolean is_top) (package private) MultiTypeNodeList(package private) voidPreparation step which copies the code iff necessary.(package private) ContextSequence<N> sequToVisit(TypedElement el, TypedAttribute selectAtt, List<eu.bandm.tools.xslt.tdom.Element_xsl_sort> sortings) (package private) Comparator<Context<N>> sort2comp(eu.bandm.tools.xslt.tdom.Element_xsl_sort el) voidvisit(TypedPCData pcd) Typed PCData in incomplete result elements or in an xslt element (eg.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute_set el) AttributeSets have a constant frequency of "perSourceCorpus".voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_call_template el) Static checks have been passed, otherwise code==null, seeTransformationvoidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_choose el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_comment el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el) Implements [XSLT 1.0:11.3].voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_element el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_if el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_import el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_include el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_key el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_message el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_namespace_alias el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_number el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el) Inherit transparently: descending.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_output el) Can be overridden by the user to define particular semantic operations.voidvisit(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.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_preserve_space el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_sort el) NOP.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_strip_space el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_template el) Executed after a call-template (caller!=null) or apply-templates.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_text el) Deliver text contents, or start a sub-parser for "disabled output escaping".voidvisit(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.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_variable el) Can be overridden by the user to define particular semantic operations.voidvisit(eu.bandm.tools.xslt.tdom.Element_xsl_when el) Can be overridden by the user to define particular semantic operations.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 aApplication.Value_RS.(package private) voidvisit_xslt_contents(eu.bandm.tools.xslt.tdom.Element el) voidTop-Level MultiTypeNodeList are sequences of xslt elements, complete result elements and MultiTypeNodeList.void(package private) voidwarning(Location<XMLDocumentIdentifier> loc, String s, Object... args) Methods inherited from class eu.bandm.tools.xslt.base.CombinedVisitor
testMulti, visit, visit, visitMultiListContentsMethods 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, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitMethods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
documentClient
-
transformation
-
input
-
msg
-
trace
-
externalParameterValues
-
emptyParameterValues
-
namespaces
Is sum of transformation.ns_contexts and rewritten blocks. -
tpathInterpreter
-
builtInFunctions
-
topVariableValues
Map<NamespaceName,Value<N>> topVariableValues"((CombinedVisitor)this).subtrees" is a collection of "self-modifying" code objects. They are a rewritten copy of "transformation.result_subtrees" !! Value_RS is a "xslt result tree fragment", a special value. -
topCalculating
Set<NamespaceName> topCalculating -
bindings
-
topLevelBindings
-
current_template
Rt.TemplateEntry current_template -
attributeNamesOnlyOnce
boolean attributeNamesOnlyOnce -
current_context
-
initial_context
-
resultFrame
-
_VARIABLE_CIRCULAR
-
_VARIABLE_UNDEF
-
dynamicVariableValues
Caches stack variables (params, with-params, variables) the frequency of which is constant or once. (perSource, perParams, perCorpus) (not perInputNode) -
byIds
-
builtInFunctionsAdditionalContext
-
tpathCallingLocation
Location<XMLDocumentIdentifier> tpathCallingLocation -
semiparsingAnnotation
-
semiparseConstructorCache
-
callState
Application<N>.CallState callStateCommunicates the call state between visitor methods of apply-templates and called template -
getNode
-
attrNames
-
cache_constant_pattern_values
The first key into this map is a NamespaceName context, ie. a prefix->nsUri binding. Here pointer eq or map equality are both sensible, with different impact on execution speed. -
uri_INLINE
- See Also:
-
tag_INLINE
- See Also:
-
ns_INLINE
-
-
Constructor Details
-
Application
public Application(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, DocumentClient<N> documentClient, @Opt @Opt FunctionLibrary<N> allFuncs, Trace trace, Transformation transformation, N input, @Opt @Opt Map<NamespaceName, Value<N>> externalParameterValues)
-
-
Method Details
-
pushBinding
-
execute
Top-level call for the start element. (initial_contextis already set up.) FIXME result should be checked for unity !?!? -
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
-
rewrite_recursive
-
matchSimilar
FIXME namespace name prefix is NOT available here !?!?! -
dumpTemplate
-
dumpBindings
-
dumpBindings
-
hintCurrentFocus
void hintCurrentFocus() -
log
-
log
-
error
-
error
-
warning
-
hint
-
failure
-
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 variablesbindingsandcurrent_context.
FIXME CACHE !?!? (dep. on frequencies) -
eval_xslt_attr_to_value
Evaluate the tpath expr in the given xslt attributes value, using the pre-compiled tpath objects in thetransformation's cache. -
eval_xslt_attr_to_string
Evaluate attribute and convert it to string, according to xpath rules. -
eval_xslt_attr_to_namespaceName
Evaluate attribute and convert it to NamespaceName (use no default). -
retrieve_xslt_expr
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 theMultiTypeNodeListfieldMultiTypeNodeList.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
Find the template for the current focus (may be the default template), execute it and store the result viadeliver(eu.bandm.tools.tdom.runtime.TypedSubstantial)into the currently growing result sequence. ONLY called from visit(xsl:apply-templates). -
findMatchingTemplate
Only called from ONE point infindRuleAndApply(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
-
_traceTest
-
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
-
deliver
-
deliver
void deliver(char[] ch, int start, int length) -
deliver
-
deliverEth
-
deliverAtt
-
previousErrorIndication
-
dropResultFrame
protected void dropResultFrame() -
findSemiparseConstructor
-
_display
-
_display
-
collectPcData
-
reduceResultFrameToString
-
reduceResultFrame
-
visit_xslt_contents
void visit_xslt_contents(eu.bandm.tools.xslt.tdom.Element el) -
visitMultiList
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:
visitMultiListin classCombinedVisitor
-
visit
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:
visitin interfacePCDataVisitor- Overrides:
visitin classeu.bandm.tools.xslt.tdom.Visitor
-
visitResultElement
- Overrides:
visitResultElementin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn .- Overrides:
visitin classeu.bandm.tools.xslt.tdom.Visitor
-
sort2comp
-
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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) and for all components in its contents according to the content model.- Overrides:
visitin classCombinedVisitor
-
evalAttributeName
-
evalAttributeValue
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
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:
visitin classeu.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, seeTransformation- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_choose el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) and for all components in its contents according to the content model.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_comment el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el) Implements [XSLT 1.0:11.3].- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_if el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_import el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_namespace_alias el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.bandm.tools.xslt.tdom.Visitor
-
getSelfAndAncestorsUnderDocument
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_output el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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 aApplication.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
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:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_preserve_space el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
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:
visitin classeu.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.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) .- Overrides:
visitin classeu.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 incallState. 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:
visitin classCombinedVisitor
-
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:
visitin classCombinedVisitor
-
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, seefeedTextToResult(Element,String)("general entities" are not considered ? FIXME)- Overrides:
visitin classCombinedVisitor
-
visit
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_when el) Description copied from class:eu.bandm.tools.xslt.tdom.VisitorCan 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 callingvisit(..)in turn for all selected attributes (seeBaseVisitor.validating) andfor all PCData and all Elements in its contents.- Overrides:
visitin classCombinedVisitor
-
calculate_absolute_pattern_value
calculate and cache node sets which only depend on the namespace context. -
feedTextToResult
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 !?!?!?
-