public class Transformation extends MessageSender
Templates
,
which is top-level, (2) possibly further files, included or imported,
(3) a library of tpath functions.
Modifier and Type | Class and Description |
---|---|
protected class |
Transformation.Loader
Copies top-level definitions from template into its own, structured directories,
for named templates, pattern controlled templates, attribute value sets,
top-level parameters and variables.
|
static class |
Transformation.Modifiers
Parameters to modify the execution of a
Transformation . |
static class |
Transformation.NumberLevel |
class |
Transformation.XslAttributeSet
Decoding of Xslt Attribute set contents.
ATTENTION interpret specification that attribute's attributes "name" and "namespace" are evaluated in top-level context ONLY ONCE with top-level "current node". |
class |
Transformation.XslOutput
Decoding of Xslt Output object.
|
Modifier and Type | Field and Description |
---|---|
Function<TypedSubstantial,String> |
_PRINTNAME |
protected List<Transformation> |
calledBy
Accumulator for called-by stack, to detect cyclic import.
|
protected Function<NamespaceName,FunctionSignature> |
functionTypes |
Set<eu.bandm.tools.xslt.tdom.Element_xsl_template> |
matchingTemplates
Redundant to templateRegistry.
|
protected Type.XPathProperType |
maximalVarType |
protected Function<NamespaceName,Type.XPathProperType> |
maximalVarTypes |
protected static Function<NamespaceName,Type.XPathProperType> |
minimalVarTypes |
protected Transformation.Modifiers |
modifiers |
Map<TypedSubstantial,Binding<String,String>> |
ns_contexts
redundant copy, use instead of "origins.get(el).ns_contexts"
|
Map<TypedSubstantial,NamespaceName> |
ns_names
Some static string objects other than attribute and element names, eg.
|
protected Binding<NamespaceName,eu.bandm.tools.xslt.tdom.Element> |
possibleBindings
Accumulator for top-level definitions.
|
Map<eu.bandm.tools.xslt.tdom.Element,MultiTypeNodeList> |
result_subtrees
Redundant: map union of the values form all templates, because
frequently used in Application.
|
protected ResultContext |
resultContext
Aux coprehension of result dtd features.
|
protected TemplatesCache |
templatesCache
Where to ask for included further sources.
|
protected Templates |
toplevelSource |
protected TransformationCache |
transformationCache
Where to ask for imported further sources.
|
protected TypeInference |
typeInference |
protected Map<TypedAttribute,TPathCache.ExprClassified> |
xslt_attribute_to_parsed
Map from xslt attributes to tpath expr, iff the attribute (a) is per se
and always a tpath expr, or (b) happens to be a value template.
|
Constructor and Description |
---|
Transformation(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
Trace trace,
TemplatesCache templatesCache,
TransformationCache transformationCache,
Templates toplevelSource,
Transformation.Modifiers modifiers,
Function<NamespaceName,FunctionSignature> functionTypes,
DTM.Dtd sourceDtm,
Collection<DTM.Element> topSourceElements,
List<Transformation> calledBy)
This constructor is the only external calling point,
it creates a new instance and does all type checking, inclusion resolving etc.
|
getLocation, setMsg, setTrace
protected final TemplatesCache templatesCache
protected final TransformationCache transformationCache
protected final Templates toplevelSource
protected final Transformation.Modifiers modifiers
protected final Function<NamespaceName,FunctionSignature> functionTypes
protected final TypeInference typeInference
protected final ResultContext resultContext
protected final List<Transformation> calledBy
protected Type.XPathProperType maximalVarType
protected Function<NamespaceName,Type.XPathProperType> maximalVarTypes
protected static Function<NamespaceName,Type.XPathProperType> minimalVarTypes
public final Map<eu.bandm.tools.xslt.tdom.Element,MultiTypeNodeList> result_subtrees
public final Map<TypedSubstantial,Binding<String,String>> ns_contexts
public final Map<TypedSubstantial,NamespaceName> ns_names
NamespaceName
.
Since these are known statically, but not coded in the tdom model, they
are stored here explicitly.
For different node types there are different NamespaceNames, but
luckily maxmally one(1) each. In detail these are...
public final Set<eu.bandm.tools.xslt.tdom.Element_xsl_template> matchingTemplates
protected Binding<NamespaceName,eu.bandm.tools.xslt.tdom.Element> possibleBindings
protected Map<TypedAttribute,TPathCache.ExprClassified> xslt_attribute_to_parsed
Templates
(their recognition
is necessary to prevent the tdom Element construction).public final Function<TypedSubstantial,String> _PRINTNAME
public Transformation(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, Trace trace, TemplatesCache templatesCache, TransformationCache transformationCache, Templates toplevelSource, Transformation.Modifiers modifiers, Function<NamespaceName,FunctionSignature> functionTypes, DTM.Dtd sourceDtm, Collection<DTM.Element> topSourceElements, List<Transformation> calledBy)
makeDirs()
.toplevelSource
- source already parsed into a Templates
object,
ie. a bi-coloured graph.templatesCache
- where to look for included sourcestransformationCache
- where to look for imported transformationspublic void dump(PrintStream ps)
public void dump(PrintStream ps, ContentHandler p)
public void printFrequenciesAndTypes(PrintStream ps, MessageLocationFilter filter)
public String _PRINTNAME(TypedSubstantial o)
public static void checkAttNameNotXmlns(String name, String[] qname, Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
public static boolean UriSyntaxCheck(String s)
public static <E extends Enum<E>> E checkEnumerationValue(Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, CDataAttribute attr, String spec, String v, Class<E> enumclass)
public static boolean checkEnumerationValue(Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, CDataAttribute attr, String spec, String v, String... vals)
public static boolean checkEnumerationValue(Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, CDataAttribute attr, String spec, String v, List<String> vals)
protected void duplicateHint(Location<XMLDocumentIdentifier> loc, NamespaceName name)
protected List<NamespaceName> splitNamespaceNames(TypedSubstantial el, String text)
protected void checkUnused(Collection<? extends eu.bandm.tools.xslt.tdom.Element> set, String role, boolean strictmode)
public Transformation.XslOutput getXslOutput()
Transformation.XslOutput
with the decoded attributes of all
reachable Element_xsl_output
in the correct precendence,
overwriting and error check.see also the complete user documentation .