Package eu.bandm.tools.xslt.base
package eu.bandm.tools.xslt.base
txsl = typed xslt 1.0 interpreter with "fragmented validation".
Control flow and data structures are as follows:
- Each XSLT source file is realized as a
Templates
object. (Possibly more than one for more than one application contexts =ResultContext
!)
"Fragmented Validation" is applied when loading the xslt source into aTemplates
object. - The application of one particular top-level xslt file to one particular output
format is realized by a
Transformation
. - For each of these, a
TemplateRegistry
stores all templates with a "@match" attribute for later efficient matching decisions. - The run w.r.t. one particular input is realized as an
Application
. - The templates are tdom
instances of xslt and of
the target model, joined by bi-colored nodes =
MultiTypeNodeList
s. -
CombinedVisitor
andCombinedDumper
visit these trees transparently. - The evaluation process is simply to replace all xslt-world elements in these mixed nodes by target-world elements and then reducing the sequence of sub-elements to one target element. This may fail.
- All expressions are cached for optimization:
TPathCache
for tpath expressions; attributes with embedded "{..}" code inAttributeValueTemplate
; all source files and instantiated programs inTemplatesCache
andTransformationCache
, resp.
Sketch of the overall architecture:
--> ctrl and data flow / => data flow only local and aux classes in (brackets) /----------------> tpath.runtime.FunctionLibrary / BuiltinFunctions <== / \\ Main -----------> resultContext.newInstance()--------------------->PathMap \\ |\\ // \\ | \ \ getTransformation(uri, resultCtx, FunLib,...) // || | \ ------------> TranformationCache ------> TemplatesCache // || | \ | | ^ ^ | //(validation) || | \ V | |(import) | V VV || | \ Transformation--' (include)| Templates || | | ||(Modifiers,XslOutput, | | V || | | || XslAttributeSet, Loader, | MultiTypedNodeList || | | || ContextChecker) | | (frequency) || | | || | | | V || | | || | | | AttributeChecks_valueTemplates | | || | | V (extends dtm.AttributeChecks) | | || | | TPathCache || | | || | | V || | | || | | ExprClassified || | | || | | V || | | || | | AttributeValueTemplate|| | | || V | Templates || | | || Transformation || | | || V Templates ... || | | VV Transformation ... || | | TemplateRegistry || | |new(...) || (Finder<N>) || | |execute() || // | \__________ || // V \ || // org.w3c.dom.Document V VV // tpath.dom.DOMClient ==> Application -->BuiltinFunctions.AdditionalContext (Binding) || org.w3c.dom.Document VV tpath.dom.DOMClient ==> Application ... Application ... / (returns) / MultiTypedNodeList <-/ | V CombinedDumper (prints to file)
-
ClassDescriptionApplication<N>Each instance of this class realizes the application of an xslt program, given as a
Transformation
, to a certain input.This is a refinement necessary for xslt ofAttributeChecks
.Parses an xslt "attribute value template" into an xpath expression with explicit string operations.Binding<L,R> Represents lexical context, i.e mappings from name to value as a linked list.Realizes all built-in functions for xslt, including those already defined for xpath.Container for the application specific values required by the built-in xslt standard function.Descends through an xslt tdom, and dumps the SAX events to someContentHandler
.Descends through an xslt tdom, and switches automatically to result tree fragment visitation (=MultiTypeNodeList
visitation), if those are found as contents of xslt leaf elements (of particular types only!), as indicated by the mapCombinedVisitor.subtrees
.AContentHandler
which suppresses all top-level elementes which are not from the xslt namespace.Generated source of a graphical user interface (GUI) for command line processing.Command line tool for checking and excuting one single xslt transformations from file to file, internally: a w3c model into a tdom model.COPIED from d2d2/base/MainGui, which is a modified copy from book2.Common local superclass for different phases of processing; provides methods to send to aMessageReceiver
and theTrace
control.Holds the contents of one future result element, as long as it is incomplete and the tdom element can not yet be constructed.The static info, how often a MixedContentContainer must be evaluated.CallsMultiTypeNodeList.PCDataOnlyVisitor.action(String)
on all contained character data.Generated source for command line processing.This enum type indicates: Switch on/off different trace outputs individually.Encoding of the target language parse automaton as states and relations.Rewriter which gives object identity to element references in content models.Derived from DTM.Singleton, for imposing object identity.Convenience class for accessing all data which depends on the target DTD and is required for xslt parsing and execution.Created on 2024-12-03_12h19m12
by program bandm/metatools/umod, version 0.17
command line =
java bandm/metatools/umod --visitordebug false --xmlgen true --getterfunctions true --visitoroptimize false --monolithic true $(HOME)/metatools/src eu.bandm.tools.xslt.base Rt.umod(Ancillary class for generating pretty-print format objects).Decoder for umod's own XML serialisation.Encoder for umod's own XML serialisation.Visitor generated by umod according to field selection #0.(Ancillary class as basis for all visitors).Visitor generated by umod according to field selection #0.Stores and organizes template codes and retrieves the best fitting for a given element.Represents one single xslt source file, w/o further context info.Caches xslt source files, e.g.Stores error messages and (OPT) the result object of the parsing process.Maintains a cache for parsing and analyzing xpath/tpath expressions in context of txsl.Holds the results of parsing and analysis.Statistic data on the sub-expressions of the top-level TPath.Union expression.This value is ONLY related to the current-node-(list)-context, not to referred variables nor functions!Control for showing/suppressing different kinds of trace messages.Represents one complete xslt program, which processes any xml input (for which a tpath interpreter exists), and delivers a bandm tdom result of a given type (or just plain text, in case of non-xml mode).Parameters to modify the execution of aTransformation
.CachesTransformation
objects, ie top-level xslt source files for one particular backend.Stores error messages and (OPT) the result object of the parsing process.Skips all whitespace-only textnodes in xslt elements (except xsl:text).Aux class for parsing and formatting numbers according to the xsl:Element_number conversion parameters, see [XSLT 1.0:7.7.1].