Class Templates

java.lang.Object
eu.bandm.tools.xslt.base.MessageSender
eu.bandm.tools.xslt.base.Templates
All Implemented Interfaces:
ContentHandler

public class Templates extends MessageSender implements ContentHandler
Represents one single xslt source file, w/o further context info. Internally PURE subtrees are realized by xslt and target tdom trees; BI-COLOURED tree nodes are realized by MultiTypeNodeList objects. Each instance of this class is a SAX receiver, ie. provides the parsing method for these bi-coloured trees.
The SAX receiver switches between xslt mode and target mode and delegates parsing to the TDOM sax receiver method. Whenever a tdom element is completed successfully, a "parseListener" can take this element and insert it into a MultiTypeNodeList. If the parsing process fails under the way, because of an xslt element embedded in a target structure (which can happen ubiquituously), then tdom parsing is cancelled. For this case a MultiTypeNodeList is constructed as a "plan b" in parallel to the SAX event forwarding, and completed instead. A missing attribute or an attribute with "value template" also leads to an incomplete target element, ie a MultiTypeNodeList.
No context check is done, this is done by the user, which is a Transformation.