public class Application<N>
extends eu.bandm.tools.xslt.tdom.Visitor
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 MultiTypeNodeLists
,
(but of course containing no more xslt elements but only Result Tree Fragments).
Modifier and Type | Class and Description |
---|---|
static class |
Application.UserInterruptionException |
protected class |
Application.Value_RS<N>
A "Result tree fragment" is a new kind of tpath value, namely a node set
on the OUTPUT side, i.e.
|
Modifier and Type | Field and Description |
---|---|
Value<N> |
_VARIABLE_CIRCULAR |
Value<N> |
_VARIABLE_UNDEF |
protected eu.bandm.tools.xslt.base.Application.AllBinding |
bindings |
protected BuiltInFunctions.AdditionalContext<N> |
builtInFunctionsAdditionalContext |
Map<NamespaceName,Value<N>> |
emptyParameterValues |
protected NamespaceName |
ns_INLINE |
protected MultiTypeNodeList |
resultFrame |
protected String |
tag_INLINE |
protected eu.bandm.tools.xslt.base.Application.AllBinding |
topLevelBindings |
protected String |
uri_INLINE |
validating
Constructor and Description |
---|
Application(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
DocumentClient<N> documentClient,
@Opt FunctionLibrary<N> allFuncs,
Trace trace,
Transformation transformation,
N input,
@Opt Map<NamespaceName,Value<N>> externalParameterValues) |
Modifier and Type | Method and Description |
---|---|
protected void |
_traceTest(String prefixText,
TypedElement el,
String testSource,
String result) |
protected void |
_traceTest(String prefixText,
TypedElement el,
String testSource,
Value result) |
protected NamespaceName |
calculate_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 void |
collectPcData(MultiTypeNodeList c,
StringBuilder sb,
String desc) |
protected void |
dropResultFrame() |
protected void |
errorOrWarning(boolean errorNotWarn,
Location<XMLDocumentIdentifier> loc,
String text) |
MultiTypeNodeList |
execute()
Top-level call for the start element.
|
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. |
List<N> |
getSelfAndAncestorsUnderDocument(N node) |
static <P> TPathCache.ExprClassified |
matchSimilar(DocumentClient<P> dc,
P node)
FIXME namespace name prefix is NOT available here !?!?!
|
protected void |
openResultFrame(@Opt NamespaceName constructor,
@Opt Location<XMLDocumentIdentifier> loc)
constructor == null when collecting variable contents.
|
protected void |
openResultFrame(@Opt NamespaceName constructor,
@Opt Location<XMLDocumentIdentifier> loc,
MultiTypeNodeList proto)
constructor == null when collecting contents for variables,
comments, processing instructions, paramters, etc.
|
protected void |
pushBinding(NamespaceName name,
Value<N> value) |
protected TypedElement |
reduceResultFrame() |
protected String |
reduceResultFrameToString(String desc) |
@Opt TypedElement |
singleResultElement() |
protected boolean |
testMulti(eu.bandm.tools.xslt.tdom.Element el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute_set el)
AttributeSets have a constant frequency of "perSourceCorpus".
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_call_template el)
Static checks have been passed, otherwise code==null, see
Transformation |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_choose el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_comment el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el)
Implements [XSLT 1.0:11.3].
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_element el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_if el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_import el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_include el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_key el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_message el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_namespace_alias el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_number el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el)
Inherit transparently: descending.
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_output el) |
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.
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_preserve_space el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort el)
NOP.
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_strip_space el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_stylesheet el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_template el)
Executed after a call-template (caller!=null) or apply-templates.
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_text el)
Deliver text contents, or start a sub-parser for "disabled output escaping".
|
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.
|
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_variable el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_when el) |
void |
visit(eu.bandm.tools.xslt.tdom.Element_xsl_with_param el) |
void |
visit(TypedPCData pcd)
Typed PCData in incomplete result elements or in an xslt element (eg.
|
void |
visitMultiList(MultiTypeNodeList mtn)
Top-Level MultiTypeNodeList are sequences of xslt elements, complete
result elements and MultiTypeNodeList.
|
void |
visitMultiListContents(MultiTypeNodeList list) |
void |
visitResultElement(TypedElement el) |
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
public final Map<NamespaceName,Value<N>> emptyParameterValues
protected eu.bandm.tools.xslt.base.Application.AllBinding bindings
protected final eu.bandm.tools.xslt.base.Application.AllBinding topLevelBindings
protected MultiTypeNodeList resultFrame
protected final BuiltInFunctions.AdditionalContext<N> builtInFunctionsAdditionalContext
protected final String uri_INLINE
protected final String tag_INLINE
protected final NamespaceName ns_INLINE
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)
protected void pushBinding(NamespaceName name, Value<N> value)
public MultiTypeNodeList execute()
initial_context
is already set up.)
FIXME result should be checked for unity !?!?@Opt public @Opt TypedElement singleResultElement()
public static <P> TPathCache.ExprClassified matchSimilar(DocumentClient<P> dc, P node)
protected NamespaceName calculate_result_nsName(eu.bandm.tools.xslt.tdom.Element el, TypedAttribute attr_name, @Opt @Opt TypedAttribute attr_namespace, boolean isAttr)
protected void _traceTest(String prefixText, TypedElement el, String testSource, String result)
protected void _traceTest(String prefixText, TypedElement el, String testSource, Value result)
protected void errorOrWarning(boolean errorNotWarn, Location<XMLDocumentIdentifier> loc, String text)
protected void openResultFrame(@Opt @Opt NamespaceName constructor, @Opt @Opt Location<XMLDocumentIdentifier> loc)
protected void openResultFrame(@Opt @Opt NamespaceName constructor, @Opt @Opt Location<XMLDocumentIdentifier> loc, MultiTypeNodeList proto)
protected void dropResultFrame()
protected void collectPcData(MultiTypeNodeList c, StringBuilder sb, String desc)
protected TypedElement reduceResultFrame()
public void visitMultiList(MultiTypeNodeList mtn)
public void visit(TypedPCData pcd)
visit
in interface PCDataVisitor
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visitResultElement(TypedElement el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_imports el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_apply_templates el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_attribute_set el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_call_template el)
Transformation
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_choose el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_comment el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_copy_of el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_decimal_format el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_element el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_fallback el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_for_each el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_if el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_import el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_include el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_key el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_message el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_namespace_alias el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_number el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_otherwise el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_output el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_variable el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_param el)
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)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_preserve_space el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_processing_instruction el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_sort el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_strip_space el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_template el)
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!)public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_text el)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_value_of el)
feedTextToResult(Element,String)
("general entities" are not considered ? FIXME)public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_when el)
protected void feedTextToResult(eu.bandm.tools.xslt.tdom.Element el, String text)
protected boolean testMulti(eu.bandm.tools.xslt.tdom.Element el)
public void visitMultiListContents(MultiTypeNodeList list)
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_stylesheet el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
public void visit(eu.bandm.tools.xslt.tdom.Element_xsl_with_param el)
visit
in class eu.bandm.tools.xslt.tdom.Visitor
see also the complete user documentation .