Package net.sf.saxon.style
Class XSLUsePackage
java.lang.Object
net.sf.saxon.tree.linked.NodeImpl
net.sf.saxon.tree.linked.ParentNodeImpl
net.sf.saxon.tree.linked.ElementImpl
net.sf.saxon.style.StyleElement
net.sf.saxon.style.XSLUsePackage
- All Implemented Interfaces:
Source,SourceLocator,GroundedValue,Item,MutableNodeInfo,NamespaceResolver,NodeInfo,Sequence,Location,SteppingNode<NodeImpl>,SiblingCountingNode,Locator
Handler for xsl:use-package elements in stylesheet.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.style.StyleElement
StyleElement.OnFailure -
Field Summary
Fields inherited from class net.sf.saxon.style.StyleElement
ACTION_COMPILE, ACTION_FIXUP, ACTION_OPTIMIZE, ACTION_PROCESS_ATTRIBUTES, ACTION_TYPECHECK, ACTION_VALIDATE, actionsCompleted, defaultCollationName, defaultMode, defaultXPathNamespace, expandText, extensionNamespaces, reportingCircumstances, staticContext, validationError, version, YES_NOFields inherited from class net.sf.saxon.tree.linked.NodeImpl
NODE_LETTERFields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidfindUsedPackage(CompilerInfo info) Bind to the package to which this xsl:use-package element refers.(package private) voidgatherNamedOverrides(PrincipalStylesheetModule module, List<ComponentDeclaration> topLevel, Set<SymbolicName> overrides) Process all the xsl:override declarations in the xsl:use-package, adding the overriding named components to the list of top-level declarations(package private) voidgatherRuleOverrides(PrincipalStylesheetModule module, Set<SymbolicName> overrides) Process all the xsl:override declarations in the xsl:use-package, adding the overriding template rules to the list of top-level declarationsGet the child xsl:accept elementsGet the package to which this xsl:use-package element refers.booleanAsk whether this node is a declaration, that is, a permitted child of xsl:stylesheet (including xsl:include and xsl:import).voidHook to allow additional validation of a parent element immediately after its children have been validated.protected voidSet the attribute list for the element.voidvalidate(ComponentDeclaration decl) Check that the stylesheet element is valid.Methods inherited from class net.sf.saxon.style.StyleElement
allocateLocalSlots, allocateLocation, bindLocalVariable, bindVariable, changesRetainedStaticContext, checkAttributeValue, checkEmpty, checkSortComesFirst, checkTopLevel, checkUnknownAttribute, compile, compileContentValueTemplate, compileDeclaration, compileError, compileError, compileError, compileError, compileError, compileError, compileErrorInAttribute, compileSequenceConstructor, compileSequenceConstructor, compileWarning, compileWarning, compileWarning, fallbackProcessing, findAncestorElement, findCollation, fixupReferences, forwardsCompatibleModeIsEnabled, generateId, getAttributeValue, getBaseURI, getBindingInformation, getCompilation, getConfiguration, getContainingPackage, getContainingSlotManager, getDeclaredVisibility, getDefaultCollationName, getDefaultMode, getDefaultValidation, getDefaultXPathNamespace, getEffectiveVersion, getLastChildInstruction, getNamespaceResolver, getObjectName, getOverriddenComponent, getPackageData, getPrincipalStylesheetModule, getProperties, getSchemaType, getStaticContext, getStaticContext, getTypeAnnotation, getUsedAttributeSets, getVisibility, getWithParamInstructions, getXslOriginal, hasImplicitBinding, index, interpretVisibilityValue, invalidAttribute, isActionCompleted, isConstructingComplexContent, isExcludedNamespace, isExpandingText, isExtensionAttributeAllowed, isExtensionNamespace, isInstruction, isNo, isPermittedChild, isSchemaAware, issueWarning, issueWarning, isTopLevel, isWithinDeclaredStreamableConstruct, isYes, makeAttributeValueTemplate, makeExpression, makeExpressionVisitor, makeExtendedSequenceType, makePattern, makeQName, makeRetainedStaticContext, makeSequenceType, makeSortKeys, markTailCalls, mayContainFallback, mayContainParam, mayContainSequenceConstructor, processAllAttributes, processAttributes, processBooleanAttribute, processDefaultCollationAttribute, processDefaultMode, processDefaultValidationAttribute, processDefaultXPathNamespaceAttribute, processExcludedNamespaces, processExpandTextAttribute, processExtensionElementAttribute, processStandardAttributes, processStreamableAtt, processVersionAttribute, reportAbsence, requireSyntaxExtensions, seesAvuncularVariables, setActionCompleted, setCompilation, setIgnoreInstruction, setInstructionLocation, setObjectName, setValidationError, substituteFor, typeCheck, typeCheck, undeclaredNamespaceError, validateChildren, validateSubtree, validateValidationAttribute, xPath10ModeIsEnabledMethods inherited from class net.sf.saxon.tree.linked.ElementImpl
addAttribute, addNamespace, addNamespace, attributes, checkNotNamespaceSensitiveElement, copy, delete, fixupInsertedNamespaces, generateId, getAllNamespaces, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getLineNumber, getNodeKind, getNodeName, getRoot, getSchemaType, getSystemId, getURIForPrefix, initialise, isId, isIdref, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeNamespace, removeTypeAnnotation, rename, replaceStringValue, setAttributeInfo, setAttributes, setLocation, setNamespaceMap, setNilled, setNodeName, setSystemId, setTypeAnnotationMethods inherited from class net.sf.saxon.tree.linked.ParentNodeImpl
addChild, children, compact, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, insertChildren, iterateChildren, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumberMethods inherited from class net.sf.saxon.tree.linked.NodeImpl
atomize, compareOrder, effectiveBooleanValue, equals, getDisplayName, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getRawParent, getSiblingPosition, getSuccessorElement, getTreeInfo, getURI, hasFingerprint, head, insertSiblings, isDeleted, iterateAxis, iterateAxis, newBuilder, replace, saveLocation, setRawParent, setSiblingPositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
children, equals, getGenre, getPublicId, hashCode, isSameNodeInfo, isStreamed, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
XSLUsePackage
public XSLUsePackage()
-
-
Method Details
-
findUsedPackage
Bind to the package to which this xsl:use-package element refers.- Throws:
XPathException
-
getUsedPackage
Get the package to which this xsl:use-package element refers. Assumes that findPackage() has already been called.- Overrides:
getUsedPackagein classStyleElement- Returns:
- the package that is referenced.
-
prepareAttributes
protected void prepareAttributes()Description copied from class:StyleElementSet the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass- Specified by:
prepareAttributesin classStyleElement
-
isDeclaration
public boolean isDeclaration()Description copied from class:StyleElementAsk whether this node is a declaration, that is, a permitted child of xsl:stylesheet (including xsl:include and xsl:import). The default implementation returns false- Overrides:
isDeclarationin classStyleElement- Returns:
- true if the element is a permitted child of xsl:stylesheet or xsl:transform
-
validate
Description copied from class:StyleElementCheck that the stylesheet element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.- Overrides:
validatein classStyleElement- Parameters:
decl- the declaration to be validated
-
postValidate
Description copied from class:StyleElementHook to allow additional validation of a parent element immediately after its children have been validated.- Overrides:
postValidatein classStyleElement- Throws:
XPathException- if any error is found during post-traversal validation
-
getAcceptors
Get the child xsl:accept elements- Returns:
- the list of child xsl:accept elements
-
gatherNamedOverrides
void gatherNamedOverrides(PrincipalStylesheetModule module, List<ComponentDeclaration> topLevel, Set<SymbolicName> overrides) throws XPathException Process all the xsl:override declarations in the xsl:use-package, adding the overriding named components to the list of top-level declarations- Parameters:
module- the top-level stylesheet module of this packagetopLevel- the list of declarations in this package (to which this method appends)overrides- set of named components for which this xsl:use-package provides an override (which this method populates).- Throws:
XPathException- in the event of an error.
-
gatherRuleOverrides
void gatherRuleOverrides(PrincipalStylesheetModule module, Set<SymbolicName> overrides) throws XPathException Process all the xsl:override declarations in the xsl:use-package, adding the overriding template rules to the list of top-level declarations- Parameters:
module- the top-level stylesheet module of this package (the using package)overrides- set of named components for which this xsl:use-package provides an override (which this method populates). If the xsl:override contains any template rules, then the named mode will be included in this list, but the individual template rules will not be added to the top-level list.- Throws:
XPathException- in the event of an error.
-