Class XSLUsePackage

    • Constructor Detail

      • XSLUsePackage

        public XSLUsePackage()
    • Method Detail

      • getUsedPackage

        public StylesheetPackage getUsedPackage()
        Get the package to which this xsl:use-package element refers. Assumes that findPackage() has already been called.
        Overrides:
        getUsedPackage in class StyleElement
        Returns:
        the package that is referenced.
      • prepareAttributes

        protected void prepareAttributes()
        Description copied from class: StyleElement
        Set 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:
        prepareAttributes in class StyleElement
      • isDeclaration

        public boolean isDeclaration()
        Description copied from class: StyleElement
        Ask 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:
        isDeclaration in class StyleElement
        Returns:
        true if the element is a permitted child of xsl:stylesheet or xsl:transform
      • validate

        public void validate​(ComponentDeclaration decl)
        Description copied from class: StyleElement
        Check 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:
        validate in class StyleElement
        Parameters:
        decl - the declaration to be validated
      • postValidate

        public void postValidate()
                          throws XPathException
        Description copied from class: StyleElement
        Hook to allow additional validation of a parent element immediately after its children have been validated.
        Overrides:
        postValidate in class StyleElement
        Throws:
        XPathException - if any error is found during post-traversal validation
      • getAcceptors

        List<XSLAccept> 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 package
        topLevel - 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.