Package net.sf.saxon.style
This package provides classes used during the compilation of an XSLT stylesheet. The instances of these classes are discarded once compilation is complete, and they play no role in executing the transformation at run-time, except when tracing and debugging are invoked.
The class StyleElement represents an element node on the stylesheet tree. Subclasses
of StyleElement represent individual stylesheet elements, and are generally named according to
the XSLT element name, for example XSLApplyTemplates, XSLChoose. The class XSLStylesheet
is used for the xsl:stylesheet
element in each stylesheet module, and in particular for the
xsl:stylesheet
element in the principal stylesheet module.
During construction of the stylesheet tree, the class StyleNodeFactory is nominated to the Builder as the factory class responsible for creating element nodes on the tree. It is this class that decides which subclass of StyleElement to use for each element appearing in the stylesheet. For extension elements, the decision is delegated to a user-created ExtensionElementFactory.
Each class provides a number of methods supporting the various phases of processing. The sequence
of events sometimes varies slightly, but in general the first phase is done by prepareAttributes
,
which performs local validation of the attributes of each instruction. The second phase is represented
by the validate
method, which does global validation, fixup of references, and type checking.
The third phase is done by the compile
method, which generates Instruction
and
Expression
objects. Further processing (local and global optimization) is then done on these
Instruction objects, and is no longer the responsibility of this package.
-
Interface Summary Interface Description ScopedBindingElement Marker interface for elements that declare a variable which is in-scope within their bodyStylesheetComponent This interface is implemented by all top-level XSL elements that can contain local variable declarations. -
Class Summary Class Description AbsentExtensionElement This element is a surrogate for an extension element (or indeed an xsl element) for which no implementation is available.AttributeValueTemplate This class represents an attribute value template.Compilation Represents an XSLT compilation episode, compiling a single package.ComponentDeclaration The object represents a declaration (that is, a top-level element) in a stylesheet.DataElement This element represents a top-level element in a user-defined namespace, or a child/descendant of such an element.ExpressionContext An ExpressionContext represents the context for an XPath expression written in the stylesheet.ExtensionInstruction Abstract class representing an extension instructionLiteralResultElement This class represents a literal result element in the style sheet (typically an HTML element to be output).PackageVersion A class to represent an XSLT package version such as 1.12.5 or 3.0-alphaPackageVersionRanges A class to handle a set of package version rangesPrincipalStylesheetModule Represents both the stylesheet module at the root of the import tree, that is, the module that includes or imports all the others, and also the XSLT package that has this stylesheet module as its root.PublicStylesheetFunctionLibrary A PublicStylesheetFunctionLibrary filters a StylesheetFunctionLibrary to include only those functions whose visibility is final or public.SourceBinding Helper class for xsl:variable and xsl:param elements.StyleElement Abstract superclass for all element nodes in the stylesheet.StyleNodeFactory Class StyleNodeFactory.StylesheetFunctionLibrary A StylesheetFunctionLibrary contains functions defined by the user in a stylesheet.StylesheetModule A stylesheet module represents a module of a stylesheet.StylesheetPackage A (compiled) stylesheet package.TextValueTemplateContext Define the static context for expressions appearing between curly braces in a text value template.TextValueTemplateNode A text node in an XSLT 3.0 stylesheet that may or may not contain a text value templateUseWhenFilter This is a filter inserted into the input pipeline for processing stylesheet modules, whose task is to evaluate use-when expressions and discard those parts of the stylesheet module for which the use-when attribute evaluates to false.UseWhenStaticContext This class implements the static context used for evaluating use-when and other static expressions in XSLT 3.0 A new instance of this class is created for each use-when expression encountered; there are therefore no issues with reusability.XSLAccept Represents an xsl:accept element in an XSLT 3.0 package manifest.XSLAcceptExpose Handler for xsl:accept and xsl:expose elements in stylesheet.XSLAccumulator Handler for xsl:accumulator elements in a stylesheet (XSLT 3.0).XSLAccumulatorRule Handler for xsl:accumulator-rule elements in a stylesheet (XSLT 3.0).XSLAnalyzeString An xsl:analyze-string elements in the stylesheet.XSLApplyImports An xsl:apply-imports element in the stylesheetXSLApplyTemplates An xsl:apply-templates element in the stylesheetXSLArray xsl:array element in stylesheet - proposed XSLT 4.0 instruction The xsl:array element has the same content model as xsl:sequence.XSLArrayMember xsl:array-member element in stylesheet - XSLT 4.0 proposal.XSLAssert An xsl:assert element in an XSLT 3.0 stylesheet.XSLAttribute xsl:attribute element in stylesheet.XSLAttributeSet An xsl:attribute-set element in the stylesheet.XSLBreak A xsl:break element in the stylesheetXSLBreakOrContinue Abstract class containing functionality common to xsl:break and xsl:next-iterationXSLCallTemplate An xsl:call-template element in the stylesheetXSLCatch Handler for xsl:catch elements in stylesheet.XSLCharacterMap An xsl:character-map declaration in the stylesheet.XSLChoose An xsl:choose element in the stylesheet.XSLChooseOrSwitch An xsl:choose or xsl:switch element in the stylesheet.XSLComment An xsl:comment elements in the stylesheet.XSLContextItem An xsl:context-item element in the stylesheet.XSLCopy Handler for xsl:copy elements in stylesheet.XSLCopyOf An xsl:copy-of element in the stylesheet.XSLDecimalFormat Handler for xsl:decimal-format elements in stylesheet.XSLDocument An xsl:document instruction in the stylesheet.XSLElement An xsl:element element in the stylesheet.XSLEvaluate Handler for xsl:evaluate elements in XSLT 3.0 stylesheet.XSLExpose Represents an xsl:expose element in an XSLT 3.0 package manifest.XSLFallback xsl:fallback element in stylesheet.XSLForEach Handler for xsl:for-each elements in stylesheet.XSLForEachGroup Handler for xsl:for-each-group elements in stylesheet.XSLFork Handler for xsl:fork elements in XSLT 3.0 stylesheet.XSLFunction Handler for xsl:function elements in stylesheet (XSLT 2.0).XSLGeneralIncorporate Abstract class to represent an xsl:include or xsl:import element in the stylesheet.XSLGeneralVariable This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-paramXSLGlobalContextItem An xsl:global-context-item declaration in the stylesheetXSLGlobalParam An xsl:param element representing a global parameter (stylesheet parameter) in the stylesheet.XSLGlobalVariable Handler for xsl:variable elements appearing as a child of xsl:stylesheet.XSLIf Handler for xsl:if elements in stylesheet.XSLImport xsl:import element in the stylesheet.XSLImportSchema Compile-time representation of an xsl:import-schema declaration in a stylesheetXSLInclude xsl:include element in the stylesheet.XSLItemType The class implements a xsl:item-type declaration in a stylesheet.XSLIterate Handler for xsl:iterate elements in stylesheet.XSLKey Handler for xsl:key elements in stylesheet.XSLLeafNodeConstructor Common superclass for XSLT elements whose content template produces a text value: xsl:text, xsl:value-of, xsl:attribute, xsl:comment, xsl:namespace, and xsl:processing-instructionXSLLocalParam An xsl:param element representing a local parameter (template or function parameter) in the stylesheet.XSLLocalVariable Handler for xsl:variable elements acting as local variable declarations in a stylesheet.XSLMap Handler for xsl:map instructions in an XSLT 3.0 stylesheet.XSLMapEntry Handler for xsl:map-entry instructions in an XSLT 3.0 stylesheet.XSLMatch An xsl:match element in the stylesheet (new in XSLT 4.0).XSLMatchingSubstring Handler for xsl:matching-substring and xsl:non-matching-substring elements in stylesheet.XSLMerge Handler for xsl:merge elements in stylesheet.XSLMergeAction XSLMergeKey An xsl:merge-key element in the stylesheet.XSLMergeSource Implements the xsl:merge-source element available in XSLT 3.0 as a child of xsl:merge.XSLMessage An xsl:message element in the stylesheet.XSLMode Handler for xsl:mode elements in stylesheet.XSLModuleRoot Class representing xsl:stylesheet, xsl:transform, or xsl:packageXSLNamespace An xsl:namespace element in the stylesheet.XSLNamespaceAlias An xsl:namespace-alias element in the stylesheet.XSLNextIteration An xsl:next-iteration element in the stylesheetXSLNextMatch An xsl:next-match element in the stylesheetXSLNumber An xsl:number element in the stylesheet.XSLOnCompletion An xsl:on-completion element in the stylesheet (XSLT 3.0).XSLOnEmpty An xsl:on-empty element in the stylesheet.XSLOnNonEmpty An xsl:on-non-empty element in the stylesheet.XSLOriginalLibrary A function library that recognizes the function name "xsl:original", which may appear within xsl:overrideXSLOtherwise Handler for xsl:otherwise elements in stylesheet.XSLOutput An xsl:output element in the stylesheet.XSLOutputCharacter An xsl:output-character element in the stylesheet.XSLOverride Represents an xsl:override element in a package manifest.XSLPackage Handler for xsl:package elements.XSLPerformSort Handler for xsl:perform-sort elements in stylesheet (XSLT 2.0).XSLPreserveSpace An xsl:preserve-space or xsl:strip-space elements in stylesheet.XSLProcessingInstruction An xsl:processing-instruction element in the stylesheet.XSLResultDocument An xsl:result-document element in the stylesheet.XSLSequence An xsl:sequence element in the stylesheet.XSLSort An xsl:sort element in the stylesheet.XSLSortOrMergeKey XSLSourceDocument Handler for xsl:source-document element in XSLT 3.0 stylesheet.XSLStylesheet An xsl:stylesheet or xsl:transform element in the stylesheet.XSLSwitch An xsl:switch element in the stylesheet (XSLT 4.0).XSLTemplate An xsl:template element in the style sheet.XSLText Handler for xsl:text elements in stylesheet.XSLTry Handler for xsl:try elements in stylesheet.XSLUsePackage Handler for xsl:use-package elements in stylesheet.XSLValueOf An xsl:value-of element in the stylesheet.XSLWhen Handler for xsl:when elements in stylesheet.XSLWherePopulated An xsl:where-populated element in the stylesheet.XSLWithParam An xsl:with-param element in the stylesheet. -
Enum Summary Enum Description SourceBinding.BindingProperty StyleElement.OnFailure