This package provides classes for the compiled representation of the various elements and other instructions found in an XSLT stylesheet. The same constructs are also used for evaluating similar constructs in XQuery, in particular, expressions that construct new nodes.
Instances of these classes are constructed when the stylesheet or query is compiled. In the
case of XSLT, the objects
representing the compile-time stylesheet (in package
net.sf.saxon.style) can then be
discarded and garbage-collected.
The most important class is
Instruction, which represents an XSLT Instruction. In most cases
these instructions have a one-to-one relationship with instructions in the original source XSLT
stylesheet, and the names of the subclasses (for example ApplyImports, ApplyTemplates, Choose)
In XSLT 1.0, XSLT instructions and XPath expressions were quite distinct, and were evaluated in different
ways: XSLT instructions in "push" mode (they were described as "writing to the result tree"), and XPath expressions
in "pull" mode (reading from the source tree). This distinction is no longer present in the XSLT 2.0 processing
model, and the boundary between the
Expression classes is therefore
a rather fuzzy one. Both instructions and expressions can now be evaluated in either push or pull mode.
Flow-of-control constructs such as conditional expressions and FOR expressions are evaluated in either mode
depending on their parent expression.
Interface Summary Interface Description ConditionalInstructionThis is a marker interface for Choose and Switch instructions DebuggerThis interface may be implemented by an external debugging tool InstructionWithComplexContentInterface implemented by instructions that contain a sequence constructor evaluated using the rules for "constructing complex content": for example, xsl:element, xsl:copy, xsl:document, xsl:result-document ITemplateCallAn interface satisfied by all instructions that invoke templates: apply-templates, call-template. TailCallInterface representing a Tail Call. TailCallReturnerThis interface represents an expression that is capable of being processed leaving tail calls for the calling instruction to deal with. ValidatingInstructionInterface implemented by instructions that have validation and type attributes
Class Summary Class Description ActorThis object represents the compiled form of a user-written function, template, attribute-set, etc (the source can be either an XSLT stylesheet function or an XQuery function). AnalyzeStringAn xsl:analyze-string element in the stylesheet. ApplyImportsAn xsl:apply-imports element in the stylesheet. ApplyNextMatchingTemplateAn xsl:apply-imports or xsl:next-match element in the stylesheet. ApplyTemplatesAn instruction representing an xsl:apply-templates element in the stylesheet ApplyTemplates.ApplyTemplatesPackageAn ApplyTemplatesPackage is an object that encapsulates the sequence of nodes to be processed, the mode, the parameters to be supplied, and the execution context. AttributeCreatorAbstract class for fixed and computed attribute constructor expressions AttributeSetThe compiled form of an xsl:attribute-set element in the stylesheet. BinderyThe Bindery class holds information about variables and their values. Bindery.FailureValueA value that can be saved in a global variable to indicate that evaluation failed, and that subsequent attempts at evaluation should also fail BlockAn expression that delivers the concatenation of the results of its subexpressions. BlockIteratorIterate over the instructions in a sequence of instructions (or an XPath comma expression), concatenating the result of each instruction into a single combined sequence. BreakInstrA compiled xsl:break instruction. CallTemplateInstruction representing an xsl:call-template element in the stylesheet. CallTemplate.CallTemplatePackageA CallTemplatePackage is an object that encapsulates the name of a template to be called, the parameters to be supplied, and the execution context. ChooseCompiled representation of an xsl:choose or xsl:if element in the stylesheet. CommentAn instruction representing an xsl:comment element in the stylesheet. ComponentTracerA wrapper expression used to trace execution of components such as functions, templates, and global variables in XSLT and XQuery. ComputedAttributeAn instruction derived from an xsl:attribute element in stylesheet, or from an attribute constructor in XQuery, in cases where the attribute name is not known statically ComputedElementAn instruction representing an xsl:element element in an XSLT stylesheet, or a computed element constructor in XQuery. ConditionalBlockAn XSLT 3.0 sequence constructor containing xsl:on-empty and/or xsl:on-non-empty instructions CopyHandler for xsl:copy elements in stylesheet. CopyOfAn xsl:copy-of element in the stylesheet. DoctypeA saxon:doctype element in the stylesheet. DocumentInstrAn instruction to create a document node. DummyNamespaceResolverA dummy namespace resolver used when validating QName-valued attributes written to the result tree. ElementCreatorAn instruction that creates an element node. EvaluateInstrAn EvaluateInstr is the compiled form of an xsl:evaluate instruction ExecutableA compiled stylesheet or a query in executable form. FixedAttributeAn instruction derived from an xsl:attribute element in stylesheet, or from an attribute constructor in XQuery. FixedElementAn instruction that creates an element node whose name is known statically. ForEachHandler for xsl:for-each elements in a stylesheet. ForEachGroupHandler for xsl:for-each-group elements in stylesheet. ForkThis class implements an xsl:fork expression. GlobalContextRequirementInformation about the requirements placed by a query or stylesheet on the global context item: whether it is mandatory or optional, what its type must be, and whether it has a default value. GlobalParamThe compiled form of a global xsl:param element in an XSLT stylesheet or an external variable declared in the prolog of a Query. GlobalParameterSetA GlobalParameterSet is a set of parameters supplied when invoking a stylesheet or query. GlobalVariableA compiled global variable in a stylesheet or query. InstructionAbstract superclass for all instructions in the compiled stylesheet. IterateInstrAn IterateInstr is the compiled form of an xsl:iterate instruction LocalParamThe compiled form of an xsl:param element within a template in an XSLT stylesheet. LocalParamBlockRepresents the set of xsl:param elements at the start of an xsl:iterate instruction MemoFunctionA user-defined function that is declared as a memo function, meaning that it remembers results of previous calls. MessageAn xsl:message element in the stylesheet. NamedTemplateThe runtime object corresponding to a named xsl:template element in the stylesheet. NamedTemplate.LocalParamInfo NamespaceConstructorA namespace constructor instruction. NextIterationImplements a xsl:next-iteration instruction within the body of xsl:iterate NextMatchAn xsl:next-match element in the stylesheet NumberInstructionThis instruction performs the node-counting function of the xsl:number instruction. OnEmptyExprA compiled xsl:on-empty instruction. OnNonEmptyExprA compiled xsl:on-non-empty instruction. OriginalFunctionThis class represents a function invoked using xsl:original from within an xs:override element. ParameterSetA ParameterSet is a set of parameters supplied when calling a template. ParentNodeConstructorAn abstract class to act as a common parent for instructions that create element nodes and document nodes. ProcessingInstructionAn xsl:processing-instruction element in the stylesheet, or a processing-instruction constructor in a query ResultDocumentThe compiled form of an xsl:result-document element in the stylesheet. SequenceInstrA compiled xsl:sequence instruction. SimpleNodeConstructorCommon superclass for XSLT instructions whose content template produces a text value: xsl:attribute, xsl:comment, xsl:processing-instruction, xsl:namespace, and xsl:text, and their XQuery equivalents SlotManagerA SlotManager supports functions, templates, etc: specifically, any executable code that requires a stack frame containing local variables. SourceDocumentNon-streamable implementation of the xsl:source-document instruction TemplateRuleThe runtime object corresponding to an xsl:template element in the stylesheet. TraceExpressionA wrapper expression used to trace expressions in XSLT and XQuery. UseAttributeSetThis instruction corresponds to a single QName appearing within a use-attribute-sets attribute on a literal result element, xsl:element, or xsl:copy instruction. UserFunctionThis object represents the compiled form of a user-written function (the source can be either an XSLT stylesheet function or an XQuery function). UserFunctionParameterRun-time object representing a formal argument to a user-defined function ValueOfAn xsl:value-of element in the stylesheet. WherePopulatedA compiled xsl:where-populated instruction (formerly xsl:conditional-content). WithParamAn object derived from a xsl:with-param element in the stylesheet.
Enum Summary Enum Description UserFunction.Determinism
Exception Summary Exception Description TerminationExceptionAn exception thrown by xsl:message terminate="yes".